This is a read-only archive!

Arrrrgh Emacs

If only it was possible to have a Lisp REPL in Vim. There are some hacks to try to get it working but they aren't pretty. Someone gave a good go at getting something like SLIME to work in Vim, but he gave up because Vim's C code is too nasty to comprehend, which saddens me (I'll take his word for it and remain blissfully ignorant; I don't want to think of my precious Vim as having an ugly codebase).

So if you want to use Lisp, you're pretty much chained to Emacs and SLIME. Most websites I've found have been nearly universal in recommending SLIME even over the standard commandline REPL that your Lisp implementation provides. But I find it frustratingly hard to accomplish even the simplest tasks in Emacs. Things like undo, copy/paste, changing fonts, opening two windows (in the sense of Vim "windows") at once and easily switching between them.

I can't even remember the keystroke to open or save files, in spite of having "learned" it (i.e. looked it up) a dozen times. C-X C-f. Why not C-x f? C-x f is bound to set-fill-column, whatever that is. Better yet, why not C-f? (In spite of my best efforts, I couldn't figure out what C-f does. I know there's a command that tells you what keystrokes do, but I can't remember it.) Why does something so common as editing a file have such a long keybinding? How can I easily remember when to C and when not to? Let alone when to M.

For my own sanity:

  • C-h m: Get a list of keybindings.
  • M-p: Repeat previous input i.e. preserve sanity while playing with the REPL.
  • C-x C-q: Close all open parens at cursor (one of the things that makes writing Lisp even feasible for a human being).
  • q: Close one of the temporary buffers that Emacs throws in your face at alarmingly regular intervals.

At least I finally did figure out how to get color themes working in Emacs. The Emacs GUI itself still looks horrific but at least the text I'm typing is readable without giving me an intense migraine.

November 22, 2007 @ 1:30 PM PST
Cateogory: Programming
Tags: Lisp, Emacs, Vim, Rant


Quoth jwickers on November 22, 2007 @ 3:58 PM PST

Once you get a bit fluent in Emacs finger torture you can customize your shortcuts.

Personally i use a F key for one keystroke buffer switching, the same could apply to other features like the Open file if you think you use it often... like C+C-S-S for finding a symbol using cscope in c++ mode.

Also undo is pretty simple : C+_, and that the same for undo in Bash :)

Quoth numerodix on November 23, 2007 @ 3:10 AM PST

Emacs is a monster indeed, I gave up a long time ago trying to understand it. I'm still trying to figure out vim in the meantime, and I'm having about as much luck as you do with emacs ;)

Steven Oliver
Quoth Steven Oliver on November 27, 2007 @ 7:04 AM PST

I've looked through VIM's code. I don't know if its "ugly" per say, but does look a bit hackish in some spots.

Aidan McQuay
Quoth Aidan McQuay on June 08, 2010 @ 9:02 PM PDT

"I know there's a command that tells you what keystrokes do, but I can't remember it." Haha, that make me snort my coffee our my nose, and I know exactly how you feel.

Quoth Joel on June 09, 2010 @ 11:07 PM PDT

I'd really like to learn LISP, or any of it's variants, but Emacs is immensely frustrating to learn. There doesn't seem to be any logic in it's commands (C-e for end of line, sure. C-a for beginning? What?)

Stathis Sideris
Quoth Stathis Sideris on June 13, 2010 @ 7:53 PM PDT

After many failed attempts to learn how emacs works, it dawned on me: emacs is supposed to be the ultimate customisable editor, so I should be trying to learn how it works, I should be trying to "teach" emacs how I work.

I sat down and taught myself a bit of elisp (immensely more enjoyable than trying to learn all those keystrokes) and I started making emacs into something that I fitted my workflow exactly. I started with the basics (copy, paste, load, save etc) and whenever a new requirement came up I would just think of a keyboard shortcut that I would remember and put it in my .emacs file.

I a happy user now, and I mainly use emacs for editing org-mode files :)

Quoth Winus on December 01, 2010 @ 9:02 AM PST

Maybe you should try out Vimclojure, which implements a decent REPL inside Vim (it has function doc-hints when doing auto-completion; some other features are also cool).