SlimV and Vim
I've switched between Emacs and Vim a few times over the last 15-odd years, before finally (?) settling on Vim. I've come to the realization, as many have before me, that for all the elegant awesomeness of Emacs Lisp,
Vim is a better text editor, Emacs is good for everything else
Perhaps one day if Guile or Emacsey deliver their full promise, I'll happily live inside a REPL forever.
Until then, it's just much, much, much faster to do the equivalent text operations in Vim than in Emacs (yes, I mapped CapsLock to Control; yes, I replaced M-
by C-xC-m-
).
There were still a few Emacs-only things that haunted me (I outgrew the need to have a web browser or an IRC client in my editor environment, I now use Google Chrome for the former and BitchX/Irssi/Xchat for the latter. I also don't mind reading my email in the browser), such as org-mode
. Fortunately for me, I don't most of its features, and keeping a timestamped diary is something I was able to fix for myself with some shell scripting and vim shortcuts.
Recently, I decided to learn Common Lisp with as much of a newbie attitude as possible. And here I ran into a veritable wall of convention. Of course, didn't I know, that Emacs + Slime is the one true way ?
I dithered, was flustered and nearly reconsidered.
And then I discovered the awesomeness I was looking for, a replacement for Slime in Vim, Slimv!
Here is a tutorial to get you started, but basically all I had to do was to install the plugin and the rest pretty much just worked.
There are quite a lot of nifty tricks here, but my most frequently used commands are:
,L
: that's a comma followed by L): compile current file,D
: compile current form,s
: lookup a short summary description of the keyword under the cursor,c
: Open Slimv session (splits the window horizontally)I was also new to paredit mode
, which is pretty much necessary for making changes to heavily nested parantheses, and it has useful commands there too:
,W
: wrap an extra set of parentheses around the current form,S
: it's opposite; remove one set of parentheses from the current form,<
, ,>
: move the parentheses under the cursor one form to the left or right... and much more. So next time someone tells you how Slime
is indispensable and hence Emacs is indispensable, throw Slimv in their face! Kudos to the guy who built it!