Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What features am I missing when I use Vim instead of Emacs?

share|improve this question
13  
Looking to start the vi vs emacs war ... again ... :-) – Bruce McLeod Jul 21 '09 at 13:19
8  
I'm in the VI camp :wq – Bruce McLeod Jul 21 '09 at 14:27
1  
My development tools at uni consisted of vi .. CC ... gdb ... repeat – Bruce McLeod Jul 21 '09 at 14:42
2  
Somehow you have to make the choice between different options. Listening to the benefits of different solutions is much better than flipping coins. – Christian Jul 21 '09 at 14:53
11  
To all the haters: this is a legitimate question. Whenever someone puts Vim and Emacs into the same sentence on SO or SU, everyone seems to freak out, but the fact that a lot of people seem to have emotional ties to one of the editors doesn't mean we shouldn't allow questions that compare them. How is someone supposed to select an editor if they aren't allowed to ask about the differences between them? – Sasha Chedygov Jan 8 '11 at 9:20
show 6 more comments

11 Answers

up vote 11 down vote accepted

As a Vim (and probably a future Emacs) user I miss

but as an ex-Emacs user I don't miss

  • pain in my hands which Emacs is famous and responsible for
  • having to install the editor on every server you have to login
share|improve this answer
5  
have you ever tried using tramp: gnu.org/software/tramp ? – user3860 Jul 27 '09 at 12:17
1  
No, I didn't try using tramp. But I am more used to run the editor from the shell rather than the shell from the editor. – sastanin Aug 1 '09 at 9:28
1  
Tramp is good for one-off file edits on remote servers as well. And, if you're launching emacs every time you need to edit something, you're doing it wrong :-) – Doug Harris Sep 4 '09 at 17:59
5  
The fourth point, "interaction with external processes" is the biggest omission from Vim IMO, which is sad, as one can get some very nice low-grade IDE going in Emacs, which is not possible in Vim. – Svend Apr 28 '10 at 14:04
1  
Good spell checking? I've been pretty happy with the spell checking built into VIM, maybe you could clarify what you mean? – Aaron H. Jan 7 '11 at 18:08
show 5 more comments

One thing that Emacs has that seems impossible to do in Vim is to detect changes in a file and act upon them. There is no "FileChanged" event to hook into. This means writing complex plugins such as org-mode is nigh-on impossible in Vim. You have to fudge it by tracking cursor movement, which adds lots of corner cases that cause slip ups. I wrote a plugin for Vim to emulate Emacs's diff-mode for editing patches and hit upon this issue. It works, but requires some inelegant autocmd * CurosorMoved hacks.

This is probably also why there are far fewer plugins for Vim that integrate external tools in the same way that there are for Emacs.

There is no clean way to map Alt/Meta and a keypress to an action in Vim. There are numerous workarounds, but none of them work particularly well in all cases. If you use a UTF-8 shell and terminal Vim, you are mostly out of luck. This means that you can't emulate the readline/Emacs keys in insert mode as is attempted in the Vimacs plugin. It may break in GVim or in terminal Vim depending on how you do it.

One other difference is that in Emacs the key mappings are uniform in all of the edit buffers. Vim has a different set of keyboard shortcuts when you are in command mode after typing a :. These keys are not like the usual readline mappings, nor are they like the rest of the Vim keys. For example, you have to use Shift-Left to go back a word instead of typing b. Hitting Ctrl-F enters a strange edit buffer for the command line that has its own set of rules. This makes opening new files a bit of a pain as you have to remember that you are not on the command line, nor are you in regular Vim.

I use Vim exclusively - including using It's All Text! - but I appreciate where Emacs is coming from.

share|improve this answer
About those external tools :/ I still can't get simple cmd in emacs on windows. Vim has a much better respect that it's not the only tool. Emacs forces the *nix onto you, regardless on what platform you actually are. – ldigas Jun 20 '12 at 22:14

Org-mode is an absolutely fabulous outliner, GTD/todo manager, note organizer and general framework for writing, which is developed as an Emacs major mode. It has a fantastic lead developer (Carsten Dominik, see his Google Tech Talk video), and a great community. I was a happy Vim user for 12 years, and still gladly do the odd config file inn in it. But mainly now I'm a very happy org-mode (therefore Emacs) user. No other open source outliner comes within leagues of it in function or flexibility. I do all my PhD writing and note-taking in it.

share|improve this answer

Emacs has a vi mode, but vi does not have (as far as I know) an emacs mode.

EDIT: And don't forget C-x M-c M-butterfly

share|improve this answer
1  
and my favorite, M-x psychoanalyze-pinhead – chris Jul 21 '09 at 16:40
2  
Yes there is - vim.org/scripts/script.php?script_id=300 - although you have to be.. slightly insane to use it – dbr Aug 12 '09 at 17:47
Or somebody who actually likes Emacs's key bindings like myself. – Rayne Feb 19 '11 at 7:48
Thank god for that! – ldigas Jun 20 '12 at 22:15

alt text

share|improve this answer
2  
Link to the origin? – Dennis Williamson Jul 21 '09 at 16:09
Your link is dead (or so it appears here on Chrome). I'm going to edit it with one that works and points to the same image. – new123456 Jul 31 '11 at 18:12

Better completion and lisp instead of vimscript...

Edit:

There is also a really good comparison here: http://www.io.com/~dierdorf/emacsvi.html

share|improve this answer
7  
Not everyone will feel like lisp instead of vimscript is an advantage... But they're code weenies. – Stefan Thyberg Jul 21 '09 at 13:30
2  
Vim also supports a wide array of other languages for scripting... – Aaron H. Jan 7 '11 at 18:09

You actually have to leave your editor to use the operating system if you use Vim. I use emacs because of emacspeak and all the applications it works with like AIM, spreadsheets, etc.

share|improve this answer

Never used vim really for more than basic vi features (so correct me if I am wrong), but I don't think you can do with vim (except with external processes of course)

  • open a directory listing and just edit it (search&replace file parts, replace permissions using rectangle mode, delete files by deleting lines) and then "save" that and all your files are changed so that the new directory listing looks like you edited it

  • chat in IRC networks (including scriptability in a language you already know if you use Emacs a lot)

  • show embedded images (even simple HTML and LaTeX previews)

  • do an interactive search&replace where you add dynamic replacements (e. g. in pattern [0-9]x[0-9] increase the number before the x by 3), or in pattern <element id=".*"> make the attribute of the id lowercase, or in pattern </?h[1-5]> increase the digit by one).

  • have an arbitrary-precision calculator to evaluate expressions inside your text files (or even spreadsheet-like).

share|improve this answer
1  
I don't know about the other ones, but you can do the dynamic replacements with Vim. – Al. Aug 12 '09 at 10:16
Except the 4th one (what I usually do with macros), I honestly don't know why these should be included in any text editor. – ldigas Jun 20 '12 at 22:21

There are no foot pedals available vor vim.

share|improve this answer
5  
Hmm, the foot pedal could be useful for exiting insert mode.. – dbr Aug 12 '09 at 17:48

The big difference for me between vi(m) and emacs is the core UI experience of modality.

In vi(m) you have the big split between edit mode, and command/navigation mode. In emacs, you pretty much start typing and use wild metacharacter sequences to get what you want. Both are kind of hard to get used to, but once you are used to it you've got so much pattern embedded in your brain (read:muscle memory) that it's hard to switch. (Though there is Cream that loosens the modality of vim a bit)

The other big thing is the concept of extensibility. vi came about in the real real old days of UNIX, where a small terse editor was mandatory given memory constraints. Emacs came a bit later, when machines were slightly more generous with RAM, and the goal seemed to isolate from the command environment a bit more, and keep you in Emacs. As such, emacs has a rich history of scripts and ability to do things other than editing. The joke goes "Emacs would make a fine OS if someone would just write a decent text editor for it".

As such, either is fine. Whichever editor you start to use, you'll get very used to the patterns of usage, and it will be harder for you to switch.

As for me, I dislike the modality of vi, and the complexity of emacs, and I use nedit for simple edits, though it's very long in the tooth now. A simple config, and it tries to stay out of my way. If I don't have X, I'll use vi, and curse the modality and not having X.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.