How would you compare these editors? What are the pros and cons of each?
[note] This is not meant to be answered by those who "hate one and love another" or those who haven't used both.
|
I'll post what I think are the main benefits of each: Emacs has considerably more extensions to let you do tasks that are only vaguely text-editor related, like browsing the filesystem or messing with version control, and extensions that are in no way text-editor related, like reading RSS feeds. If you want an environment instead of just a text editor, Emacs is going to be better than Vim. I also think Emacs is much easier to learn, despite what some would have you believe:
In particular, I think a novice Emacs user will be faster than a novice Vim user On the other hand, Vim is undeniably faster. It seems like this is a core part of the argument, but in my opinion there's no contest at all; I consider myself a fluent Emacs user, and I'm no match for the couple people I know that have an equal knowledge of Vim. The problem is, the number of people that have sufficient mastery of Vim to be that fast is incredibly small (of the ~30 people I talk to regularly who use Vim, I think only one is exceptionally good at it). There's a large gap between the possible speed gain and the actual speed gain you achieve; Emacs users are going to be almost as fast as 99% of Vim users, and (as I said in the Emacs section) beginning Emacs users will probably be faster than beginning Vim users |
|||||||||||||||||||||
|
|
I use both gVim and Emacs well enough to be productive, though I am expert in neither. One thing I can say with certainty is that Vim and gVim run faster on my Windows 7 laptop (which I have to use at work). Emacs, on the Windows box, has an odd habit of "pausing" for up to minute and becoming unresponsive, even while continuing to accept keyboard input, before spitting out everything accumulated in the keyboard buffer in a rush. This does not happen in Mac OS or Linux. Nonetheless I find myself using Vim or gVim most of the time on all platforms just so I don't have to stop and think about which editor I am using and adjust. That said, in a purely *nix environment, I would probably stay with Emacs because I find modeless editing slightly more natural. Bottom line: in my opinion both editors are powerful enough to handle any and all text editing needs. The choice should be based on practical considerations (like platform implementation specifics), and working style. |
||||
|
|
|
Main difference between Emacs and Vim is ergonomic. There is carpal tunnel syndrome, CTS, as you know. Emacs is very "danger" if you have CTS and provocates CTS. Vim - not, you can read about this difference in many places. For ex., in Vim you can edit text only with one finger. In Emacs - you can not :) |
|||||
|
|
I use both, although if I had to choose one, I know which one I would pick. Still, I'll try to make an objective comparison on a few issues.
|
|||||||||||||||
|
|
I use both on a regular basis. I view Emacs as a "live in" editor, whereas I use Vim for quick, one-off tasks. Superficially, Emacs is much more bloated than Vim is, and so it really isn't quite so convenient to "Fire up" as Vim, but I also find that the philosophies of user interface from one to the other support this paradigm. Emacs is much more built to keep you inside, making things nice and comfortable so you don't have to leave, whereas vim is much more "Unixy" and sees itself as part of a greater tool-belt. Many people flee from Emacs due to its heavy reliance on bucky bits, but this is a pretty silly reason to me. The real power that Emacs has over Vim is customizability, and with the power of Viper etc, this really isn't an issue. Certainly Vim-Script provides its own level of customization, and if, say, your favorite programming language wasn't provided with an appropriate syntax highlighter you could certainly cook one up, but Emacs is ultimately a self-hosting lisp-machine, and in the end you can do much, much more fiddling with it. There just aren't such tools as gnus or org-mode in Vim, to name a few. In a nutshell, Emacs isn't just an editor, it's practically a god damned operating system. For manipulating text, I'd say they're exactly on par. |
|||||||
|
|
I use
Also I don't use syntax coloring, gray over black to me is the most beautiful. And maybe I'm too stupid to figure out that tangled-multi-key-pressed |
||||
|
|
|
I'll put my $0.02 worth in, as I spent quite a few years using emacs and XEmacs and then moved over to vim. To be fair, I had actually used vi quite a bit around 1990-1992 so I was familiar with its user interface. Emacs
One unique thing I did with xemacs once was to have it running on a machine and open an x session on an xterminal (actually an old repurposed Sun 3/60) in a different room against the same buffer on the same running instance. Pros: Extensible, more powerful than any other editor known to man, mature integration with pretty much every major free software programming tool. Cons: Questionable ergonomics, elisp is not easy to learn. Vim Disclamer - I went from using emacs to vim about 10 years ago and I habitually use vim on Windows and Unix/Linux based systems.
Pros: Good keyboard macro facility, passably good extensibility and scripting, but not as good as emacs. Vim or vi-derived editors are standard on most if not all unix or general purpose linux distros. Arguably better ergonomics. Cons: Modal user interface feels strange to people used to Windows UIs. Less of an issue with vim these days. |
||||
|
|
|
I happen to think that the "vim is modal" comment above is incorrect. Vim has commands. You can do "11aNow is the time for all good men.." and end up with 11 identical new lines of text in your file. That's a command, not a mode. But there's actually a very basic difference in Vim commands vs Emacs commands. I'm not entirely sure I can describe it, but Eric Fischer incorporated Emacs-style line editing in a TTY driver 10+ years ago, and got a paper published about it: http://www.usenix.org/event/usenix99/full_papers/fischer/fischer.pdf He found that Emacs style line editing was fundamentally different than vi-style. So Emacs has an advantage that a lot of other things (bash, gnuplot, zsh, ksh some others I can't think of off the top of my head) all end up implementing Emacs-style line editing. I should note that I personally use Vim all the time. I'm only a very occasional Emacs user. |
||||
|
|
|
Since it hasn't been explicitly stated, I'll add that there is no better programming environment (lisp in a box, slime, etc.) than a slightly modified Emacs distro. All of my programming needs (99%) are taken care of from within Vim, but for all those lisp libraries and routines I write, I have to fire up Emacs to get anything productive done. |
|||||
|
|
I use Vim/gVim. I used to use Emacs, but I found gVim to generally work faster on slower machines, plus, due to its POSIX requirement, vi is available almost everywhere. When using Vim or gVim, I use the mouse a lot, support for it is great, I think. I started out using Emacs, because it was easier to use for a novice user. I found usage of nano to be quite error prone for some reason, and at some point I realized I'm much more comfortable with using vi. Right now, it's a mixture. I use Eclipse and gedit quite often, too. Vim, however, is still my favorite and most used editor. |
||||
|
|
|
I normally use vim, but they're both great editors. Learning to use vi was nasty, but I got through it and learned to like it. My most frustrating moments were when the caps lock key was on. You could try with gVim, but one of the biggest advantages with vi and emacs is the ability to do neat stuff while keeping your hands on the keyboard, and gVim is likely to keep you using the mouse. (Learning to play roguelike games at the same time gave me practice with the cursor movement keys, but caused me to try to move diagonally in documents sometimes.) Emacs is probably more approachable. It's modeless, and you aren't going to screw yourself up by hitting the caps lock key. The idea of controlling the editor through typing letters with the control key down shouldn't be too foreign to modern power users, although the actual keys to do things will seem wild and arbitrary to the typical Windows/Mac OSX user. Again, versions that allow you to use the mouse do you few favors in the long run. Both require some level of expertise to use effectively. Unlike, say, Notepad, you can't just sit down and edit. Both are configurable, although for my money writing extensions in the same Lisp the editor is written in makes a smoother experience. (Emacs, as normally distributed, isn't really an editor. It's a Lisp environment tailored for text processing, with a lot of pre-written software, including an editor. Hence the joke "Emacs makes a decent shell, but it could use a better editor.") I normally use vim because, after extensive training, it feels easier. This may be due to advantages in the mode system, where immense numbers of commands are available using one finger near the home rows, or "baby duck syndrome", which applies very much to editors: once you learn a good one, you generally stick to it. You won't go wrong using either. |
||||
|
|
|
The main reason I don't use vi/vim is that it's modal. The main reason I do use vi is that it's available almost everywhere. |
||||
|
|
There is a I'm not saying don't use Emacs or this is the only reason to use Vim, but when you want to be able to use Unix systems that aren't yours... |
|||||||||||||||||||||
|
|
I think they're both awesome. I think either one can do just about anything you can imagine, and they're both so customizable, that by the time you finish customizing them, they're both just exactly what you want them to be, nothing more nor less. Emacs stands out to me in being a bit closer (although still does not meet) to ISO/IEC standards of usability and consistency for user interfaces, and hence doesn't play as many tricks with your “instincts” about that vim does. The lifetime of instincts you've developed working with other programs won't work against you. Vim is a completely different model, and in many ways, it is superior on its own in so far as relies far less on Cntrl/Alt sequences, and instead just on its modes, allowing you to keep your hards on the home row and typing faster. But vim is virtually unique, and unless you install some very unusual accompanying software (e.g., Vimperator, Jumanji/Zathura, etc.), the instincts you develop working with vim won't cross over to other programs and vice-versa. That said, I've settled on vim myself. You've got to settle on one sooner or later, for better or worse, since it's difficult to master both. |
|||
|
|
This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site.
M-! emacs RETIt's like search google for "google" – Seamus Aug 28 '10 at 9:14