5

I've been using Vim extensively for a while now, and I really enjoy working with it. However, I keep reading praises for Emacs. I've decided to take a look at Emacs to round out my knowledge of the Unix editors (not to mention Emacs keybindings are used extensively).

But! I'm happy doing most of my daily work in Vim. So ideally what I'd like is to look at (apart from basics) are the gaps that Emacs can fill, or things that it can just do better than Vim. I suppose the canonical example is Lisp/Scheme coding in Emacs versus Vim.

Where would you start tinkering with Emacs to really appreciate its power, and to get a good idea of how its approach to editing differs from Vim, and how the editors can complement each other? What would be a good introduction in the same vein?

4 Answers 4

7

Which features are complementary? Pretty much everything that isn't straight text editing. Reading mail, usenet, running a shell, debugger (gdb), compiling, version control integration, man pages, todo lists/project planning (org, planner), browsing web, ide (CEDET), IM, IRC, remote file editing (TRAMP), etc. There are even silly things like games: tetris, snake, bubbles, pong.

Within the domain of strict text editing, both Emacs and vi do the job, which you prefer is like which ice cream you prefer. And I agree with richardhoskins, Viper mode is probably the way to explore Emacs if you're not interested in switching whole-hog.

Note: Apologies if any of the features are provided in vim, it's been a long time since I used it, and I was a very simple user of vim.

1
  • 1
    I'd recommend against using viper mode initially. Get familiar with the emacs key bindings, then enable viper mode - otherwise you end up just "using a crappy emulation of vi", rather than a decent editor which can have vi's key-bindings
    – dbr
    Commented Aug 14, 2009 at 19:08
6

You could use Viper mode. Viper is a vi emulator that guides a vi user through 5 levels, each level introducing features as the user becomes comfortable with Emacs.

Level 1 is almost straight vi. Level 5 is almost Emacs. You can switch out of viper into straight Emacs and back again at will.

Viper ships with Emacs, and is all set up and ready to use. M-x viper-mode runs it. It has an introductory screen that explains how to use it.

1

What switched me over from nvi/vim to nvi/emacs as my respective "change two words in a file" / "spend hours editing a huge directory tree full of files" editors was the integration of subprocesses. Being able to evaluate a region of text in an interpreter with a keystroke, automatically jump to errors in order to correct them, and then leave the interpreter running the whole time was extremely helpful.

Other things that I miss today when not using emacs: consistency of keybindings across modes and contexts (cut / paste / movement / etc. work the same in the minibuffer as in a buffer), interactive updating display of potential completions via ido mode ("C-x b" shows me a list of buffers I could switch to, typing a single letter ".c" hides all of the ones without a .c somewhere in the name, "C-s" rotates the list, "enter" picks the item on the front of the list. I am frustrated by the unusability of my window manager or firefox, now that I have this way of switching contexts everything else is clumsy).

Another advantage in my mind is the multifold advantage that most of emacs is implemented in emacs lisp. That means that emacs lisp is usable as an extension language and has the features needed for real programming. That means that the extension language is kept reasonably efficient and scalable. That means that when people extend emacs to improve their productivity, their features can be trivially integrated into the official emacs. Over time this means that emacs is community developed on a scale matched by no other free software project (though firefox may eventually catch up with xul/userscript stuff). That means that since elisp is a highly reflective language, I can query details about functionality of the editor in an interactive way - in a reflective enough language, the program itself is the most accurate documentation you can have.

0

What really compelled me to switch from Vim to Emacs was Org-Mode, which allows for flexible personal organization or publishing. It's an outliner, and I don't think there's anything that comes close in Vim. I also extensively use R and Latex, and the built-in support for both of those are more robust (in my experience) than the integration in Vim. I do like the Vim-Latex suite, but Emacs seems more powerful.

I really enjoy using Vim, but now currently use Vimpulse mode udner EMACS which is an enhancement of Viper-mode to make it vim-like. One of the advantages of vimpulse as opposed to using regular vim is that you can do more stuff under "edit mode"; if you want to do quick edits you can use the emacs keybindings without having to switch modes.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .