In the spirit of
ComparingNotPissing:
EmacsEditor and
ViEditor are both so good, why not use them both?
One Novice's View
I'm a complete novice at both Emacs and Vi (I'm an old Mac BbEdit user) and am learning them both. It seems to me that both camps have excellent points. Emacs has a shallow learning curve and you can get started pretty quickly. Vi has a steep learning curve at the very beginning. I had to sit with book in hand (actually, I had to cycle between browser tutorial and editor window) in order to learn how to load, edit, and save a file.
I use vi to quicky edit dotfiles (launch, edit, quit), but I'm still using Emacs when I'm working on HTML or PHP pages (edit, save, switch to browser, reload, back to Emacs). I expect this will change over time. --
SeanOleary
Seconded. For short edits, I use vi; for long edits, emacs. If my editing involves multiple files, I definitely use emacs; for even though modern vi clones do have multiple file facilities comparable to emacs, I never got over to learning those. My vi usage is always "standard vi"; if you rely on extensions, most of the point of using vi (small size, available everywhere) is gone.
Sometimes I wonder, if the point of the vi paradigm is reducing the amount of movement your fingers have to perform, why the $!@# is
escape the mode switch key? --
PanuKalliokoski
One suggestion I have heard from long-time vi hackers is control-[ instead of escape, staying near the home keys.
Ah, of course. Doesn't work very well on most international keyboards, though - at least not without remapping.
My favorite description of the difference between Emacs and Vi is "Vi is a command, Emacs is an environment". When I'm fooling around at a shell prompt and I want to do a quick file edit (as mentioned above), I use Vi; when I expect to work on a lot of files for a long stretch of time, I use Emacs.
I'm curious about the statement that vi has a steep learning curve - for basic editing, it seems fairly simple - cursor movement keys, x for deletion, a or i to insert, Esc for mode change, and ZZ to save. I'll grant that doing more than that will require a reference.
I suspect this takes Emacs' menu bars into account - when you're starting out, finding in menus is easier than remembering key sequences.
Ah, I see. I (being a vi bigot) have not seen emacs' menu bars. Menu bars? Hah! A GUI in disguise.....:-> --
PeteHardie
The same thing with gvim... Anyway, in most cases gvim and emacs adopt similar "ideologies" (their expected area of usage seems to be the same), they have just grown from different roots. Why is it that we don't much see arguing between (say) nvi and vim users?
I pretty much made up how to type when hacking from age eight until high school (in retrospect, it was amusing - I could achieve about 30 words a minute, and had motions which were hand-over-hand). Breaking and relearning the habit was hard, but I did it mostly successfully in high school typing class. One artifact, however, is that I hardly ever use my right pinky - and I'm still trying to unlearn this without much success. This causes me to do contorted things with C-x C-foo, pivoting my left hand. So I tried to learn Chet's emacs back on my first shell provider, and GNU emacs on a couple of occasions on my first Linux boxen, but found it physically painful - my left hand would cramp up when using it full speed.
(I also have an unbroken habit from the writing-assembly-under-DOS-with-edit.com days of saving the file I'm working on close to every thirty seconds.) --
JasonFelice
CategoryEmacs CategoryVi