Why is vi(m) superior to Emacs? Many reasons, the two chief ones being:
- modes
- chicks. —>
Standard disclaimer: I have used both editors for significant amounts of time.
Modal editing is the single most powerful tool in an editor’s repertoire. Faithful Emacs users will, of course, complain and reference “beep mode.” Presumably the real complaint is that vi has a steep learning curve. When you open an editor, you should be able to type and see text, not be reprimanded by malicious beeping.
I’ll grant that vi has a learning curve. To be as productive as in a plain editor a la Word/notepad, it takes a day or so. To be as productive as in Emacs, it’ll take some practice. But you can’t tell me vi is any more difficult or cryptic than Emacs. Which looks easier?
- :wq
- control-x control-c
My fingers hurt just trying to imagine holding control/meta for every text operation. Modes offer sheer power. Rather than just having operations available to you via holding the control/meta keys, which is incredibly awkward with almost any modern keyboard, you have your entire keyboard available. Every key works together to alter text as fast as you can think. It’s rather impossible to describe the magic you can work with a few keys, but I’ve been using vi for years and still learn every day.
Beyond saving your fingers from meta-hell what does vi offer, you wonder? Well, it’s a text editor, for one. Emacs is more like the OS from hell, all packaged into one convenient huge binary. If I were an Emacs user, I’d at least have its startup time to blame for posting infrequently. Vi edits text. Emacs claims to, but it also claims to read email, newsgroups, the internet, calendars, IRC, play Tetris… Emacs has plugins to do just about anything except suck up all your memory – that, my friend, it does by default. Vim has plugins to edit text. Hrm.. that sounds about right for a text editor. Not to mention instant loading and a tiny footprint, while packing in all that power.
I know Emacs users can’t leave this one to the books, though. “Vi is the devil, it won’t stop beeping.” Put half as much time into vi as you did into emacs, and you might begin to appreciate it. Hell, take the time to learn vi while emacs is loading. The subtle change of mindset will overtake you. As John Arundel said, “Watching a vi guru doing some heavy editing on a file, as her fingers fly over the keys and textual transformations sweep across the screen, one could believe that one is in the presence of supernatural powers.”
Tim O’Reilly uses vi, and sells twice as many vi books as emacs books. Richard Stallman uses Emacs.
:wq
FANTASTIC! I started using Linux about 2 years ago, and didn’t have the slightest clue as to the power behind vim. I read, learned, read, tryed, read, and used…now I’m an addict! I agree, and can’t imagine why the hell anyone would want to ctrl this, meta that. Obviously I’m somewhat naive on this as I have only tried emacs
But I feel so powerful with vim that I don’t think I’ll ever change…
January 28th, 2005, at 6:14 pm #Don’t worry, anything more than trying emacs just increases the pain. Ctrl-alt-meta-shift-X-C-R only gets more and more annoying as your wrists begin to hurt.
January 28th, 2005, at 6:44 pm #[...] Oh yeah and on a side note, Vi gets you chicks: http://halffull.org/2005/01/09/emacs-vs-vi-the-showdown/ [...]
October 14th, 2008, at 4:15 pm #should read:
Which looks easier?
Shift-:-w-q
October 21st, 2008, at 4:07 am #I don’t know any way to get a colon other than using shift. (Well, I’m not going to use the Character Map, anyway.)
Shift is in a natural location for your pinkies, and you use it constantly for capital letters. (I hope.) Control is in an inconvenient location and requires shifting your hand to perform any emacs commands.
The only hand movement in vi is for escape, and many people remap it to be closer. (Yes, you can remap control for emacs, too, but that was only part of my reasoning above.)
October 21st, 2008, at 11:10 am #Well.. It should read:
Esc Shift-: x Enter Ctrl-x-c
if in “insert mode”
otherwise:
shift-: x enter vs Ctrl-x-c
But not a good command to compare.. compare d4d j p ….to…. Ctrl-u 4 Ctrl-k Ctrl-n Ctrl-y simple edits, 5 strokes, one with a finger stuck on ctrl.
November 24th, 2008, at 3:50 pm #The vi version definitely seems easier to me. Using ctrl should be a rarity. I think at this point it’s just religion.
November 24th, 2008, at 4:35 pm #ESC ESC ESC ESC ESC.
:q.
Emacs ftw.
C-x C-c.
December 6th, 2008, at 6:20 am #Wow, I never use :wq.
just type SHIFT+ZZ
January 19th, 2009, at 2:10 pm #I recently switched from Vim to Emacs. I like the fact that I can do everything from single editor
To contribute something meaningfull to this I agree that movement with vim htns (dvorak) keys is easier than with emacs. Emacs wins with the window management commands which to me seem just better. It is true too that Emacs is bloated, it takes a while to start so I rarely use it to do quick file edits as I used to do with vim. Now I use mg or if that isn’t available I use vim.
Switching the ctrl key to caps lock is pretty mandatory with emacs. With vim I had Esc in it.
Otherthing to my switch was that my vim started to get bloated too with its plugins. Writing vim plugins is pretty ‘useless’ skill as it uses vim-script language so it is useless talent outside vim. Emacs uses elisp so a lot of it carries to other lisp dialects.
Overall, I would say, use what feels right for you. They both have different view on things but they’re both great tools.
March 3rd, 2009, at 2:27 pm #You should try pe2, F3 file is faster than :wq.
October 15th, 2009, at 11:01 pm #I guess it is funny that people still comment this entry after 4 years. Anyway the things changed and today Emacs is even more bloated as before, as well as vim. The difference is that emacs has made much more advance and now it is even faster to start than vi -in server mode, otherwise it takes about 1sec.- , taking approximately the same amount of memory (some 9 mb against 6 in vi, both meaningless in today pcs.) I do agree that the modal way is better (but with some shortcuts). Today Vim is only better for quick edits, and just because it is simpler.
March 15th, 2010, at 4:49 pm #:wq =
(that’s what I use)
November 7th, 2011, at 12:17 pm #damned smilies. let’s put it this way: wq = x
November 7th, 2011, at 12:18 pm #