How to use syntax highlighting in gedit
Recommended Ubuntu book
Here we will continue the gedit tutorials and explain syntax highlighting. If you want to see previous gedit posts – you may find How to open a file with gedit on right-click and How to use gedit helpful.
Syntax highlighting is built into gedit on Ubuntu. It shows the programming or markup code in different colors, which is a very handy feature when you try to edit html, php or other programming files.
Open gedit and go to View > Highlight Mode > Scripts. Here you can see all the languages it supports by default.
Don’t see the language you need? Add or find one. All you need is a .lang file for the needed language. There are a ton of them online, just google or bing “ActionScript lang file for gedit” or start making your own. .lang files are located in /usr/share/gtksourceview-2.0/language-specs/ folder. Just place a file there or create a new one. This is also where you go to edit the file. For example, if you don’t like the default color scheme for php, open up php.lang and stat making the changes.
Pretty easy, eh?