Home / General / Emacs

Emacs

Hmmm. I started programming on an old ICL OPD (anyone else remember microdrives?). There was some fooling about afterwards with an IBM PS/2 system (woo-hoo, 40Mb of hard disk space!), but the first time I hit what I thought of as a real machine was on a unix account in the first week of college. And that’s when I first hit the biggest question any starting computer engineer hits (or used to hit, back then): Vi or Emacs.

Back then, I chose Vi by default, in that it was the first thing I came across and command/edit mode switching actually made sense to me. And I used vi for a good while afterwards, until I finally found, and immediately switched to, vim. I’ve used vim ever since for any task where I could use it on any platform where I could get it (in fact, not being able to use it for wordpress blogging ticks me off). Being able to run around a source code file in command mode and dd or y lines from here and p them over there, or J them together or call up boxes with an <F4> remap to give me a nice easy-to-spot function header, those are things I’ve gotten down to the reflex level at this stage. In short, I like vim. It’s small, fast, uncluttered. And don’t talk to me about tabbed editing and intellisense and debugger integration please, that’s been in vim for quite some time if you want it (and frankly, if you’re using Visual Studio anything and telling me it has a better editor, you seriously need to stop wasting your time). Not to mention the fact that everytime I’ve seen something like intellisense in actual use, it’s been used by some rather lazy programmers. Which isn’t to say that brace completion and the like can’t be used by good programmers, just that my impression so far hasn’t been a good one. Lie down with dogs, get fleas in your keyboard…

Anyway, the thing is, I’m familiar with the claims about the immense customisability and power in Emacs, but by the time I’d started to hear about it, I’d learnt vi, and once you learn an editor and there’s work to be done, it’s hard to justify the effort to relearn another one. Feels too much like faffing about. But right now, work’s in the research phase (ie.  Feck! Why won’t that work? Damn, go read the devel mailing list archives and the code…), and I have my little side project for the rifle club tootling away, and apparently XEmacs/GNU Emacs is now a run race and GNU Emacs is now a full superset of xemacs so there’s an easy install choice, and GNU Emacs 22 supports mercurial (there’s a blog post in there on its own methinks) out of the package, and PHP with a simple apt-get install, and the more tools you can use the better, right?

So I’ve installed a basic GNU Emacs setup on the work and home boxen with a PHP major mode, and over the next week or so, I’m going to try to use it for my side project. If that takes off, I’ll think about using it for the main project and where it fits into my toolbox overall. I suspect vim’s still a winner where another app has to call an editor (VCS commits from a command line and such) or where you’re running round /etc trying to fix something, but we’ll have to see.

First thing I have to figure out is what the emacs equivalent to command mode and edit mode are…

12 Comments

  1. When using Emacs, you live inside Emacs. There’s no reason to start it quickly for editing a file, as you are already in it /hugely different concept to Vi(m)/. For Emacs there is a mode called ‘viper-mode’ that provides a Vi(m)-like behaviour, may be you should give it a try in the first days until you get familiar with Emacs.

  2. I know, I know, I understand the whole “start ‘er up and leave ‘er running” philosophy. I’m just dont get it yet is all.
    And viper mode or vile, both seem to be cop-outs. Either I learn emacs or I don’t; half-measures where my fingers are acting like I’m in vi but my brain’s thinking in emacs, they just don’t appeal.

  3. I figure here’s as good a place to log small notes about my progress by the way, so:

    Fonts. What the bloody heck? I have to get an emacs development snapshot for reasonable fonts? Or M-x set-font-default blah? Come on, there has to be an easier way than this. At least the color themes have a menu to choose from (and this is a good place to use a menu bar, btw, I might never use the thing in vim at all, except for picking fonts/colors when I feel like a change.

    On color schemes, has zenburn been translated to an emacs color scheme?

    I will say, by the way, that after an unreasonable amount of time wrestling with the fonts in emacs, I am rather happy with the lisp machine font from here. So much so that it’s now my default vim font too 😀

  4. More updates:
    As tutorials go, the emacs tutorial is pretty decent.

    I’ve given up on fonts and colours and am sticking with the lisp machine font and the “Charcoal Black” theme for now. Zenburn it ain’t, and I miss Inconsolata, but it’ll do for now.

    I’ve started a .emacs file with some basic stuff.

    I still haven’t gotten used to not having a command *and* an insert mode.

  5. Gah.
    Seriously.
    :set nu versus finding linum.el, downloading it, creating .emacs.d/elisp and adding it to the load path, then (require ‘linum) and (global-linum-mode 1)
    I mean seriously, that’s not a very user-friendly way of doing stuff. Even if your user’s not clueless.

  6. Mark, check out .

    It’s so weird that I randomly stumbled onto this page a mere week after you posted this…

  7. I’m *seriously* getting annoyed at all the work I have to do with emacs before I can get any work done on, well, my work. I thought a straight ubuntu install would be grand, but I’m finding that all the things that I’d use in emacs are taking a lot of work just to get running. Completion, version control, fonts, colours, the works. All of them require you to invest time to customize the system to you before you can use it (I can’t use M-TAB for completion in php-mode because it’s a KDE key to change apps, for example).

    I’m *this* close to calling the whole thing off, I swear.

  8. That bomberman game was prob intense with let the bodies hit the floor song in the background

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.