User Tools

Site Tools


editors

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
editors [2019/03/06 09:04]
meesters [Turning off Gtk Warnings]
— (current)
Line 1: Line 1:
-====== Editors ====== 
- 
-On our clusters we support a number of editors. If you think your favorite one is missing, [[https://​hpc.uni-mainz.de/​high-performance-computing/​service-angebot/​softwareinstallation/​|please let us know]]. 
- 
-The following list is not exhaustive nor complete. 
- 
-===== gedit ===== 
- 
-[[https://​wiki.gnome.org/​Apps/​Gedit|gedit]] is a nice and simple to use editor with syntax highlighting for a number of languages. Due to its simplicity it is the favorite tool for some of our courses. 
- 
-==== Turning off Gtk Warnings ==== 
- 
-gedit issues a number of (annoying and meaningless) Gtk warnings. They can be turned off by placing this snippet in ones ''​.bashrc''​. 
- 
-<code bash> 
-suppress-gnome-warnings() { 
-    # $1 is the name which should appear on history but is otherwise unused. 
-    historyName=$1 
-    shift 
- 
-    if [ -n "​$*"​ ]; then 
- # write the real command to history without the prefix 
- history -s "​$historyName ${@:​2}"​ 
- 
- # catch the command output 
- errorMsg=$( $* 2>&1 ) 
- 
- # check if the command output contains not a (one of two) GTK-Warnings 
- if ! $(echo $errorMsg | grep -q '​Gtk-WARNING\|connect to accessibility bus'); then 
-     echo $errorMsg 
-        fi 
-    fi 
-} 
- 
-gedit() { 
-   ​suppress-gnome-warnings $FUNCNAME $(which $FUNCNAME) $@ 
-} 
- 
-</​code>​ 
  
editors.1551859443.txt.gz · Last modified: 2019/03/06 09:04 by meesters