“the j stands for Jehovist”
about me | research blog | wordpress plugins | jQuery plugins

30 March, 2012

Emacs

Ever since switching to Ubuntu from Windows, I’d never really found a text editor I was truly satisfied with. I spent most of my time using either Geany or GEdit, and while both are quite fine, somehow neither ever felt complete.

So a few weeks ago, after meeting probably the most hardcore power user I’ve ever known (he types in Dvorak with a blank keyboard), I decided that I would embark on the long voyage towards teach becoming proficient with the legendary text editor, Emacs.

At first it felt incredibly masochistic, like the computer science equivalent of cutting your wrists just to feel alive. Yet after two weeks, the benefits are slowly beginning to become apparent. I’m still not sure if have become a convert yet. The pain is still there of course, but somehow that almost serves to convince me that I am in fact doing the right thing.

27 July, 2011

Gedit syntax highlighting for Grammatical Framework source code

There is now an official page on the Grammatical Framework website about GF Editor Modes.

For correct syntax highlighting in Ubuntu’s default text editor (gedit) for anyone editing Grammatical Framework source code, put the code below into the file ~/.local/share/gtksourceview-2.0/language-specs/gf.lang (under Ubuntu).

Some helpful notes/links:

  • The code is based heavily on the haskell.lang file which I found in /usr/share/gtksourceview-2.0/language-specs/haskell.lang.
  • Ruslan Osmanov recommends registering your file extension as its own MIME type (see also here), however on my system the .gf extension was already registered as a generic font (application/x-tex-gf) and I didn’t want to risk messing any of that up.
  • This is a quick 5-minute job and might require some tweaking. The GtkSourceView language definition tutorial is the place to start looking.
  • Contributions are welcome!

14 July, 2011

Geany syntax highlighting for Grammatical Framework source code

There is now an official page on the Grammatical Framework website about GF Editor Modes.

I wrote a custom filetype config file for the Geany text editor, providing correct syntax highlighting for anyone editing Grammatical Framework source code. Put the code below into the file /usr/share/geany/filetypes.GF.conf (under Ubuntu). You will need to manually create the file:

Light Version

Dark Version

You will also need to edit the filetype_extensions.conf file and add the following line somewhere:

GF=*.gf;

Hope that helps someone who doesn’t feel like reading through the Geany documentation! (which btw can be found here).