In 8.04 use: |
In 8.04, 10.04, 12.04 use: |
:sudo su :update-mime-database /usr/share/mime :exit In 10.04 use: sudo update-mime-database /usr/share/mime (this should also work on 8.04) |
:sudo update-mime-database /usr/share/mime |
If you want to change the color-scheme for the active highlight mode, open the preferences from the Edit-menu, then chose the syntax highlighting tab.
Highlight style files are in the /usr/share/gtksourceview-1.0/language-specs directory, you'll need root access to edit these files.
Copy ini.lang to hal.lang and modify the first couple of lines so that they read as below.
Now when you open gEdit and pick a highlighting mode you will see hal in there.
The specific markup is listed in the file named language.dtd in the same directory. Each element corresponds to one set of highlight characteristics. For example
Will pick out the hash mark (#) and use the name = "HAL Comment" style.
While you may only use the element name, you can use an element like "line-comment" more than once with the same name if you wish to have several different highlight types displayed using the same coloration. You can also have more than one "line-comment" with different names and the color picker will allow you to colorize each differently.
To highlight .ngc files you can simply download the upload:ngc.lang file and copy it to your /usr/share/gtksourceview-1.0/language-specs directory. Note: on Ubuntu 10.04, the version of gtksourceview is 2.0, so you need to copy the file to /usr/share/gtksourceview-2.0/language-specs instead.
use the color picker in gEdit to give your ngc-files some nice colors =)
The ngc.lang file is configured to automatically highlight files with the text/ngc mime-type, Ubuntu marks the .ngc-files as text/plain, if follow these instructions the .ngc-files are automatically marked as text/ngc.
from the command-line:
add these lines to the document (not at the beginning, but between 2 other <mime-type> elements)
save the file and exit gEdit.
Rebuild the mime-database, from the command-line:
In 6.06 use:
In 8.04, 10.04, 12.04 use: