As you may have read in previous blog posts of mine, I can be a little fussy about my programming environment having used sublime, coda and many more in the past. I prefer a text editor to an IDE to be honest, simply because an IDE used to seem far too bloated for what I needed it for. But as I am using more programming languages, I am finding that some tools that are available in standard IDEs can be useful.
Take Eclipse for example; It has some great built in features for a developer’s every need. But the interface! It makes me want to gouge my eyes out. I have been spoilt by OS X, and seeing an interface with ugly icons and horrible side bars etc isn’t something I can live with. I’d prefer to remove all distractions and access the tools via some other means.
Which brings me nicely on to Emacs. I’d heard of Emacs and knew it was something similar to vi and vim. Imagine the simplest looking text editor in the world, and you have Emacs. But… All the power is hidden away. And when I say power; I mean POWER!
Emacs is written in it’s own version of Lisp, called Elisp. It has been described by some as an operating system in it’s own right, and I can see why. From this one program you can customise it to read your mail, take notes, project manage, track time, use as a full blown IDE, use as a calendar, music player and even play games on. OK, some of this stuff probably isn’t best handled by Emacs, but the fact remains, it can do it. Also, it can run as a standalone application or in the terminal and is interacted with entirely via the keyboard *throws away mouse*.
With only a few customisations, I have Emacs setup to handle auto-completion, snippets, live error checking etc for PHP using my favourite syntax highlighting theme – Solarized. It has taken me a little while but I am used to the most common key-bindings (of which there are many hundreds, if not thousands.) Opening certain file types triggers Emacs to use a certain mode. So opening a PHP file for example will open it in PHP mode. You can then customise certain options to be available for this mode, like error checking or something, that is specific to the language.
I could write an essay on all the features I have uncovered already, but there are much better write-ups on the web, so I’ll just link to a few on the best ones I’ve found here. If you’re at all interested, take a looksie:
Emacs is a very old program and was designed in the mid 70′s and has been constantly improved since by a very large community. I am very excited to start using it as my default text editor/IDE whatever-you-call-it.