How to add another script extension for syntax highlighting in gedit

root's picture

How to add another script extension for syntax highlighting in gedit:

First step is to go to the following directory:
gz@osx~# cd /Applications/gedit.app/Contents/Resources/share/gtksourceview-2.0/language-specs

There you will find a bunch of *.lang files.
My goal was to add *.ksh extension with the same highlighting like *.sh so I edited sh.lang as follows:
Open the file and search for:
<property name="globs">*.sh</property>.
Then replace it with:
<property name="globs">*.sh;*.ksh</property>.

Thou shalt not steal!

If you want to use this information on your own website, please remember: by doing copy/paste entirely it is always stealing and you should be ashamed of yourself! Have at least the decency to create your own text and comments and run the commands on your own servers and provide your output, not what I did!

Or at least link back to this website.

Recent content

root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root