Syntax highlighting erlang in GEdit

Asked by Dale Harvey

On a clean install of ubuntu hardy

When I open *.erl files in gedit, I am given Octave highlight (also affects my snippets / comments etc etc), when I check /usr/share/gtksourceview-2.0/language-specs/erlang.lang I see
<property name="mimetypes">text/x-erlang</property>
<property name="globs">*.erl</property>

and when I gnomevfs-info file.erl it gives me MIME type : text/x-erlang.

If I select Erlang from view -> Highlight Mode > sources > erlang everything works as expected, but I would like it to default to that as opposed to doing it for every file

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Bhavani Shankar (bhavi) said :
#1

Hello

To enable automatic detection of MIME type (and thereby get syntax highlighting turned on by default in gedit) copy the Overrides.xml file to ~/.local/share/mime/packages (create the directories if needed) and run "update-mime-database ~/.local/share/mime".

More info on MIME types with gedit:

http://ubuntuforums.org/showthread.php?t=383040

http://ubuntuforums.org/showthread.php?t=302835

Regards

Bhavani Shankar.

Revision history for this message
Dale Harvey (harveyd) said :
#2

is there a templates Overrides.xml file that will just make gedit syntax highlight
everything it recognises by default?

I tried writing an overrides based on one of the links, and it didnt work.

Thanks though

Revision history for this message
Bhavani Shankar (bhavi) said :
#3

No you have to create one if its non existent.... Its a tricky job.... If you have time you can experiment.... :)

Can you help with this problem?

Provide an answer of your own, or ask Dale Harvey for more information if necessary.

To post a message you must log in.