

The One True Text Editor - cwb
http://www.eecs.harvard.edu/~cduan/technical/vi/index.shtml

======
jsrn
I consider it strange that he begins his Vi/Vim tutorial with a page of (bad)
Emacs bashing. I mean, he obviously knows the virtues of his editor (I skimmed
the next few pages), but why begin it with comments like this one:

    
    
        > Emacs is based in Lisp. 'Nuff said.
    

What is that supposed to mean? You can critize Elisp for not having lexically
scoped variables (although there is lexical-let in 'cl) or tail-call
optimization. But the above "statement" sounds as if he has never looked at
Elisp code. Btw. if you are new to Emacs, make sure to have the sources
installed as well - you can then look at the implementation of every function
with

    
    
        C-h f function-name
    

and then selecting the filename (this is also true of the functions and
special forms written in C). If you do this for a while, you will recognize
that the Emacs programming model makes sense - and it's not so much because of
or in spite of Lisp \- it's more because of the Emacs-specific abstractions
(point, buffers, markers, buffer-local variables, ...) that are quite
different from the usual paradigms most of us are used to, but nevertheless
very powerful for text-munging.

    
    
        > Vi commands are a Unix standard.
    

yeah, but bash (for example) and other programs using the Readline library
default to Emacs keybindings...

    
    
        > Cleaner interface. Only one line is used
        > up for commands; everything else is your text.
        > Easy to read. Good. 
    

ok, my Emacs uses two lines (one for the modeline and one for the minibuffer).
Of course, ed has a _much_ cleaner interface than both Vi/Emacs...

~~~
travisjeffery
If someone argues that Emacs is based in Lisp the you come back with the much
stronger retort that Vim is scripted in Vim Script.

At least the people who write scripts for Emacs do it because they like the
editor and enjoy extending it with (Emacs)Lisp. The people who write scripts
for Vim do it because they love their editor more then they can't stand Vim
Script.

------
tamas
Being another hopeless victim of modal editing, I do have sometimes those "I
press a key and it appears on the screen?! What is this madness!" moments when
using other editors. However, I do not think that Vim is The One True Text
Editor. Actually, I am envious of Emacs users for their flexible, programmable
text editor (operating system? CLI application framework?), but couldn't make
the switch yet, I really do miss the Vim interface.

~~~
boskom
Are modes like Viper (<http://www.emacswiki.org/emacs/ViperMode>) helpful when
switching from vim to emacs?

~~~
roccaserra
Viper + vimpulse.el work great for me. Using Emacs with Vim key bindings is
excellent.

vimpulse.el extends ViperMode with Vim features.
<http://www.emacswiki.org/emacs/vimpulse>

------
mixmax
I tried to switch to emacs around a year ago. I even posted a thread here
labeled _Ask YC: Why is emacs a great editor?_
(<http://news.ycombinator.com/item?id=313025>) Even though I got some great
feedback and lots of tips and tricks I never got friendly with the editor. The
learning curve was simply too steep, the way of doing things too arcane and
the usability too bad.

I'm not denouncing emacs, a lot of people I hold in very high regard would
commit suicide if they couldn't use it, I'm just saying that emacs is like
Richard Stallman: An indisputable genius, but to work with him you have to do
things his way, and share his beliefs about the world. Which I don't.

~~~
mtoledo
Vi's learning curve is very steep too. As an emacs user, I sometimes use vi
when pairing with a vi colleague. I've tried to learn some more advanced vi
functionalities, but I always think the learning curve is not worth leaving
emacs behind.

I'm thinking that the issue is rather that when you learn your first editor
(emacs or vi), you don't have other good text editors as reference so you
swallow the learning curve and keep pushing. When learning the second one, its
harder to justify the learning effort.

~~~
projecktzero
Over the years, I've tried emacs several times. Then I tried VIM, and it
clicked with me. I think some people's brains click with VIM and others click
with Emacs.

------
jacquesm
Wasn't there a rule about not introducing classic flamewar subjects ?

There are ony two subjects contending for the top spot in 'the most flamewar
attraction power graph', the first is significant whitespace in python, the
second is Vi vs Emacs (and to avoid starting a flamewar by choosing a
particular order, I'll repeat them alphabetically, Emacs vs Vi).

The rest of the subjects (MySQl vs postgresql, Windows vs Linux and so on) are
mild by comparison.

~~~
bitdiddle
I'm wearing my Vi-versus-Emacs tee-shirt right now and am ready to start
brawling if anyone else is. I thought all the Vi users were either dead or in
old veterans homes.

~~~
jacquesm
I hope that t-shirt is flame retardant...

------
Keyframe
what amazes me with emacs is that every time I learn something new AND use it.
Recently I've found out about irc in it, I use eshell constantly, now I've
found out about gomoku.

~~~
jacquesm
Emacs is a fantastic operating system.

One day there will be an 'emacs machine' that boots straight into emacs,
current unices are just used as scaffolding during this unfortunate but
necessary stage.

EDIT: Thanks for the downmod, in this topic it is expected I guess... :)

Here is the reference for the quote:

[http://www.freesoftwaremagazine.com/columns/gnu_emacs_22_wor...](http://www.freesoftwaremagazine.com/columns/gnu_emacs_22_worlds_greatest_software_package)

------
almost
I'm an Emacs user but I do sometimes commit the heresy of looking at Vi and
wondering. Not that I'd ever want to leave the wonderful environment I have in
Emacs with my large (and growing) collection of customizations but the modal
editing and compossable commands do look like they could be pretty cool once
you get used to them ("7 habbits of effective text editing" shows some pretty
cool stuff).

So anyway, has anyone used Viper much? I notice it has WIZARD mode which
claims to keep all of your Emacs customizations and keys working. So is Viper
just for Vi refugees in an Emacs world or might it be useful for a Emacs user
wanting to see what it's all about?

~~~
jrockway
It is not for Vi refugees. It works too much like Emacs.

As a hardcore Emacs user, I am seriously tempted by Viper. It is all the good
stuff about vi, but without having to use vi (or give up anything in Emacs). I
have tried it, and it is not _exactly_ what I want, but it is certainly close.
(I have used Vim, and it is everything that I _don't_ want.)

Think of Viper as vi + emacs, where Vim is vi + <something else>. This is why
Vim users don't like Viper.

~~~
projecktzero
Many times that I hear about Viper, someone brings up Vimpulse which is
supposedly more VIM-like where Viper is vi-like.

------
billswift
I do most of my editing in emacs. I tried fairly hard to learn vi back in the
late 1990s (even buying the O'Relly book for help), but I cannot get the habit
of separate command and writing modes; I very frequently forget about modes
altogether, and even when I don't I forget which mode I'm in until I try to
type something.

I usually have several emacs sessions suspended and ready for me to work on
with an fg command, but I have also written a script that lets me easily use
cat to append to or create a new text file from the command line, when I just
want to add a little without waiting for a new emacs session to load.

~~~
rpdillon
You should look into using emacsclient. Multiple sessions aren't really
necessary unless you're on different hosts or having stability issues. I
personally have never had stability issues with the latest official release.

------
Gertm
Vim rocks!...when emacs is not available.

------
rpdillon
He spent an hour trying to quit? Did it ever occur to him to use C-z? That's
pretty standard in Unix, and would have dropped him back to the terminal so he
could kill it easily. He's acting like C-x C-c is somehow WAY more arcane than
:q!. To each his own, I suppose.

------
troels
> Emacs is based in Lisp. 'Nuff said.

'Nuff said indeed.

------
tybris
Pfff, just type your stuff in stdin.

------
smithjchris
Emacs is for people who want to have a versatile do-it-all environment.

Vim is for people who want to process text efficiently.

Typically, software with such a high level of integration sucks. It's a
collection of mediocre tools rather than one excellent tool.

My combination of Vim + irssi + mutt + ddd is greater than any emacs tools as
they are cherry picked to be the best at their job rather than the most
integrated. I know. I binned emacs for them.

Emacs is effectively a somewhat less harsh form of vendor lock in.

~~~
jrockway
Wow, a lot of unsubstantiated "facts" to justify your personal preference. Let
me guess, the color green is better than the color orange because your eyes
are more sensitive to green? After all, it's your favorite right?

Anyway, I disagree on your comments about integration. Vim, irssi, mutt, and
ddd all use separate keybinding semantics. Switch programs, and everything you
know about using your software is thrown out the window -- now you are doing
something totally new. Repeat several times a day.

Integration affords the possibilities for greater reuse. I wrote an extension
for managing "projects". Thanks to eshell, I can easily manage my projects
from the command-line now, not just when I am editing files in emacs. (And,
there are no hacks involved; no forking a process every time I want my editor
to open another file in the project, as would be required if you wanted to do
this with vi and bash.)

 _It's a collection of mediocre tools rather than one excellent tool._

Maybe the stuff you write is...

~~~
smithjchris
How can it be a fact if it's not substantiated?

It's all down to opinion, which I chose to share. Now some replies which are
all my opinion again.

a) All my keybindings are approximately vim-like. Mutt uses vim as an editor.
I use the mouse for ddd (nail me to a cross for my sins). irssi mainly
involves: type stuff, whack enter.

b) Blue is my favourite colour (particularly oceandeep.vim).

c) Revelation: I avoid "project management" tools. That is what the filesystem
and the related tools are for.

d) Regarding forking, UNIX was designed to be small utilities working together
to build systems greater than the sum of it's parts, not one monolithic
environment. Otherwise they wouldn't have added the fork() syscall would they?
Hence, in vim, whack bang (!) and type a shell command. Pipe stuff in, get
stuff out.

e) I admit, my writing style is terrible.

..zzZZ

------
neoclassical
Knowing vi means that on any machine you have the ability to edit text... not
a bad trade-off, if you ask me. It's also a nice break if you're tired of a
Macintosh or Vista UAC asking you every ten seconds if you really want to do
what you just tried to do.

