Colored Joe Editor for GMT

 

Joe is a nice text editor in unix/linux. It can show the special words with different colors according to file type.
I re-edit definition file for csh. Now joe can understand gmt commands and parameters.

Step 1.

Copy /etc/joerc file to your home directory as a hidden file .joerc
Add the following lines to the file.

 GMT
*
+#!\+\[ ]\+\[a-z/]/gmt\>
-autoindent
-syntax gmt

*.gmt
-syntax gmt

Here is my joerc file.

Step 2.

Copy  gmt.jsf  file to /etc/joe/syntax   directory.

Step 3.

Your script file extension must be .gmt
And it should be writen as csh script.
You can also create a jsf file for bash :)

 

I think it is ok. The GMT commands are in blue; parameters are in red; re-directions, piping are also blue. Like this,

awk '{print $1, $2}' data.dat | psxy  -R28/30/30/40 -JM15 .... > map.ps           # comment

psxyz  ....  <<END>> map.ps
....
END