Automatic Syntax Highlighting Erlang in gedit

1st of June 2008

I have spent a lot of times playing around with different IDE's / code editors to find one that fits my needs, and I always end up settling on gedit, aka "Text editor" in Ubuntu.

One annoying 'feature' is that it lacks both a filetype / mime type preferences panel, and automatic detection. So to get your favourite language automatically syntax highlighted, create a new Overrides.xml in ~/.local/share/mime/packages, and copy :

<?xml version="1.0" ?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
    <mime-type type="text/x-erlang">
       <glob pattern="*.erl"/>
    </mime-type>
</mime-info>

into it, Then run :

update-mime-database ~/.local/share/mime

I hope I have got this wrong and theres actually a really easy way, but it works for now.

Comments


Walt

Jul 28, 08
I did that (on CentOS) and it spewed out some stuff that seemed to say it had done its thing, but erl files are NOT syntax-highlighted in gedit, and Erlang iss still not one of the listed languages under Syntax Highlighting in gedit's preferences.

Any ideas?

Post a Comment


Name :

Url :

Comment :
html is enabled, you may post links / images and basic formatting, styling is permitted.

75 minus five is :
Simple check against spamming robots