This spring I'm taking a class that does all its programming assignments in MIT Scheme. The last time I had to write Scheme for class, we used PLT Scheme, and thus the DrScheme editor. This time, with that option out, I've decided to do the assignments in Emacs. It is, after all, an editor built out of lisp.
I've used vim for the last five years or so. Some people ask me why this is so—I do go to MIT after all, where Emacs was originally written. The answer to that is simply that Debian got to me first, and at the time at least, the people I knew there used vim. I've heard Emacs is good, but up until this point every time I've tried it I've thrown it down in frustration and then couldn't figure out how to exit the damn thing. This time I was more determined, and made it through the initial hump of being completely useless at the editor.
Here are a few of my observations so far, after mucking around for a couple days over a period of about two weeks:
The movement commands seem much more awkward to me. Since I'm using the Colemak keyboard layout, I have backspace bound to Caps-Lock, and it is not available to be a Control key. It may be that I just need some more time to get used to emacs not being modal.
It's awkward to switch between split windows using C-x o when I have 4-6 open at a time. I'd like to be able to jump between specific ones directly.
C-x 3 will always split the window containing the current buffer evenly in two, which makes it difficult to, for example, create three equally sized vertical windows, side-by-side. Vim defaults to creating evenly sized windows even when you invoke a split twice in a row.
The paradigm of being able to have e.g. a scheme buffer or a shell as one of my split windows is nice, though I haven't yet gotten used to having to use emacs special bindings to interact with those buffers rather than what I'd use if I'd just invoked the command from a terminal.
I noticed that emacs automatically detects the VCS in my directory. It seems incredibly bizarre to me to interact with my VCS from my editor. Do people actually do this?
Emacs's use of the tab character to perform code indentation is interesting. It does solve the problem of code being auto-indented when you don't want it to, which sometimes happens to me in vim, but I wonder if it actually ends up saving keystrokes in the end, since I think not auto-indenting is the exception rather than the rule for me.
There seem to be two different methods for completion: "dynamic abbrev" expansion, which I believe is analagous to what I'm used to in vim, and M-TAB (what a horrible keybinding, as most window managers will grab this for window-switching), which seems to be some sort of language-specific completion. I haven't yet seen how this can be harnessed since the symbolic completion seems to be irrelevant for scheme.
Emacs's syntax highlighting gets at least one thing right about scheme that vim doesn't: extended comments between #| |# patterns.
Bookmarks seem waaay more verbose/awkward than vim's marks. C-x r m NAME huh? I like being able to have a very short pattern to mark and jump back to points in a file, like vim's m
/` syntax for marks. Maybe I'll need to bind the bookmark functions to something else.
I'm pretty sure at this point that I'm still trying to bend emacs into being vim with different keybindings instead of figuring out how emacs wants to be used. It's also difficult to compare and contrast between the two editors in that my .vimrc contains years of tweaks and customizations whereas my .emacs started out as a clean slate.
There are two things I'm doing to try to mentally separate emacs from vim, to avoid my fingers' muscle memory from becoming confused:
- I'm always using emacs in an X window with dark-on-light text, whereas I always use vim in a terminal with light-on-dark text.
- I'm only writing scheme in emacs. No other languages so far.
I'm planning to keep working on these programming assignments in emacs, despite it being annoying slower than I would be in vim. Tips and pointers for improving my experience are welcome.