
Why, oh why, do those nutheads use vi? - manuscreationis
http://www.viemu.com/a-why-vi-vim.html
======
drblast
Don't ever start using vi. After you do, any text editor that you are forced
to use that doesn't have vi key bindings will give you fits and make you cry.

Learning vi is your standard process of enlightenment and elation followed by
a lifetime of disappointment. Think about how you'd feel if you ate the best
meal of your life at age 13, and the restaurant where you ate it went out of
business the next day.

You'll be frustrated by all other software. You'll wander around trying to
explain to other people why the thing you had was so good, and it was so easy,
and that nothing else compares, and wouldn't it be great if everyone did
things this way.

Exactly like the author of this article.

You have been warned.

~~~
metaobject
Don't ever start using emacs. After you do, any text editor that you are
forced to use that doesn't have emacs key bindings will give you fits and make
you cry.

Learning emacs is your standard process of enlightenment and elation followed
by a lifetime of disappointment. Think about how you'd feel if you ate the
best meal of your life at age 13, and the restaurant where you ate it went out
of business the next day.

You'll be frustrated by all other software. You'll wander around trying to
explain to other people why the thing you had was so good, and it was so easy,
and that nothing else compares, and wouldn't it be great if everyone did
things this way.

You have been warned.

~~~
burke
As someone who used emacs for five years before switching to vim, my personal
experience was that the top-level comment is more true than this one.

~~~
warp
As someone who used emacs for 8 years, then swiched to vim and used that for 4
years, and then switched back to emacs 2 years ago -- my personal experience
is that being forced to use anything which isn't vim or emacs will give me
fits and make me cry, but switching from one to the other is mostly fine.

~~~
chc
As someone who always used graphical text editors with discoverable
interfaces, for a long time I found both vi and emacs to be like black boxes
covered in unlabeled fiddly knobs — except turning vi's knobs in the wrong
order would make some of the other knobs start spinning wildly. Just trying to
get either of them to use a color scheme that didn't hurt my eyes was an
exercise in frustration. I can use either passably nowadays and do use both
fairly frequently, but I have to admit I still find don't find either
particularly nice to use. I feel like whatever is great about them is always
hidden somewhere just out of sight.

------
skrebbel
> _Do whatever you want. Don't learn it if you feel it's too much effort just
> for nothing. Learn emacs instead. Or stay in your IDE using a lousy editor.
> Whatever._

Why do all articles about how wonderful vi is end with condescension?

Anyway: vi -> fast editing. IDE -> fast maintenance. I know which one I'd
choose. The text editing features of an IDE is _not_ why people choose to use
IDEs (note: of course this helps best if you use a well-supported statically
typed language - a Ruby IDE _can't_ be as awesome as a Java IDE).

Also, there could perfectly well be good IDEs with good Vim key binding
support. This would be a wonderful mix of two worlds, and finally end this
stupid discussion. I believe at least Qt Creator has a half-decent FakeVim
mode baked in.

~~~
skrebbel
Oh! I read over the line that says that the author is actually developing a
Visual Studio plugin to close exactly this gap.

That's cool. Also puts what I took for condescension in a different light.

Anyone used it? I might consider learning vi bindings decently if I can keep
getting all the IDE goodness.

~~~
qdog
I use cscope as my backend for vim, there are other ways to get your IDE
going. Adding a vim emulator would not be as good as just using vim, imho.
<http://sourceforge.net/projects/vimplugin/> is the vim plugin for Eclipse if
you can't live without Eclipse. I can't live without vim, myself ;)

------
kstenerud
I've never really felt comfortable in vi. I first started using it in 1989 at
home, used it throughout college, and then used it on-and-off during my
career, but it's never really felt powerful compared to a GUI editor.

I want a scrollbar. I want a list of files in my project that I can just click
on to open. I want tabs I can click. I want multiple windows that I can alt-
tab to. And since I spend most of my time thinking and modifying code, I'm
more often than not thinking in terms of tweaks and copy/pasting between files
rather than "replace in this block of 3 words". A mouse and GUI just feels a
lot more natural to me, even after 20 years of vi.

~~~
tomjen3
It is very nice to have a tab for each of your files.

Until you have twenty files open and you can't find the right one (will happen
sooner than you think, at least on largeish projects).

~~~
bmj
Yes, this. About a year ago, I finally bothered to understand the buffer
concept in vim (after a brief stint in emacs), and suddenly _any_ tabbed
editor felt clumsy.

~~~
Splines
I use VS2010 every day and the tabbed interface drives me nuts. I wish it was
more conceptually like Emacs.

~~~
bmj
Yes, me too. The Vim extension is quite nice, but I wish it could do buffers
rather than tabs.

------
Riesling
Whenever I am using a program other than vim I feel clumsy.

Plugins for Eclipse, Chrome and so on will only bring you so far. The other
way around, namely turning vim into a multipurpose IDE does not satisfy my
needs. One needs to admit that some features (refactoring support in Eclipse
for example) cannot be matched by the available vim plugins. I know there are
other solutions, like eclim, but I am looking for something more universal
(think of using vim bindings in your email client).

This is why I have been thinking about implementing a vim emulation layer
recently, so that every program can profit from vim keybindings. Basically
this would be implemented as some form of keygrabber that would translate vim
specific commands into regular ones.

Does anyone know of related pre-existing projects one could use as a
reference. A quick google search did not deliver any results for me.

~~~
drothlis
You didn't specify an operating system, but for OS X there's
KeyRemap4MacBook[1]. Among a zillion other things, it has a setting for
"Ubiquitous Vim Bindings" which enables vi-like bindings everywhere, except in
terminals, emacs, and vi itself. And some things like password dialog boxes
default to insert mode.

I'm not a vi person myself so I can't comment on how effective it is, but I do
use KeyRemap4MacBook to enable certain system-wide emacs/readline-like
keybindings that are missing (C-w for backward-kill-word, C-m for return) and
some ergonomic tweaks (Return key mapped to Control when held down, because I
don't have a right-hand Control key on my keyboard).

[1] <http://pqrs.org/macosx/keyremap4macbook/>

~~~
Riesling
I am using Linux right now.

I realize that the process of intercepting keystrokes is really OS specific.
On windows you need to use hooks, on linux you need to deal with x.

Anyhow, thanks for the link. Since it is open source, I will look into it.

------
dchest
I use vim for about a year or more, and I like it, however I'm still having
trouble with copying and pasting tiny fragments of text. Maybe someone can
help me out with this?

1) If I yank a line with yy, pressing P or p will insert the text into a new
line.

2) If I go to visual mode and select a region, yank it with y, then press p/P,
it gets it inserted into the current line.

That is, vim preserves new lines.

What I can't figure out is how to paste into the current line in the first
case, and, vice-versa, how to easily paste into a new line in the second case
(without doing :put, or opening a new line).

~~~
austintaylor
Whether it pastes a newline or not depends on whether you yanked one. I guess
this is what you mean by "vim preserves new lines". Don't all editors work
this way?

If you want to yank a line character-wise, you would do something like ^y$. I
have Y mapped to y$ for this sort of thing.

You cannot yank a substring of a line line-wise. That doesn't really make
sense. I typically open a new line with o and then paste in insert mode with
<C-r>". So o<C-r>".

~~~
dchest
_Don't all editors work this way?_

Seems like my description was incorrect. I meant that there are two ways to
deal with text: line-wise and fragment-wise.

In most other text editors, if you copy a line, and then paste it, it gets
pasted into the cursor position regardless whether you copied a line or a
fragment (fragment-wise). In Vim, lines yanked with 'yy' disregard the cursor
column and get pasted into a line above or below, while fragments yanked with
'y' (e.g. '0y$'), take into account the column.

I like how in Vim you can do line-wise editing, but I just miss an easy way to
paste text to the position starting with the current column regardless of the
way I yanked it.

PS Thanks everyone for replies!

~~~
weaksauce
you can always map <leader>y to yank line except for end.

Mapping the leader to , and it's even nicer. then all you need to do is ,y and
you get the line in fragment mode.

nnoremap <leader>y 0y$

or if you want just first non whitespace char you could do an uppercase y for
the leader command. swap the upper and lower to make it how you want. seems
like this would be a more useful command to have:

nnoremap <leader>Y ^y$

edit: saw that you found a workaround by pasting in insert mode. ctrl-r" any
other ways to paste in insert mode?

------
electrichead
I know this will be an unpopular comment, but my whole problem with it is
actually the attitude of those that use it. After reading the article, I was
really impressed and imagining all the ways it could help me after what, 8
years of coding into an IDE; and then I got to this:

"Do whatever you want. Don't learn it if you feel it's too much effort just
for nothing. Learn emacs instead. Or stay in your IDE using a lousy editor.
Whatever. But in any case, don't ever claim again that those 'vi guys are
nutheads' - I hope that I have succeeded in showing you why they (we) stick to
it, and you should at least be able to understand its power, even if you
prefer to stay away from it."

~~~
jng
I'm the author of the article. Yes, the ending is anticlimatic, but the only
reason is that I didn't want to "push" it on people. I just wanted to share my
views. I thought many people would complain of fanboyism if I finished with a
push to use it.

I guess you just can't please everyone.

~~~
mechanical_fish
Some unsolicited advice:

Never use the word "fanboy". It's a word used by people who hate joy.

Other people _will_ call you a fanboy no matter what you do. Ignore these
people.

You are a fan of vi. Nobody is fooled by your disclaimers: The joy shines
through. This is not a problem. Advocate vi with pride!

------
agentultra
I used vim for about 9 or 10 years before I switched to emacs. From my
perspective people use vim because they haven't tried emacs yet (I kid!).

I still have the muscle memory for vi and that's what these sorts of editors
rely on to be effective with them. Once you get enough practice the editor
practically disappears and it becomes more about the text on the screen...
almost like you are manipulating it directly with your mind.

Fun article. :)

~~~
zrail
Augh the muscle memory! I used vim for five years in and out of college and
then switched to emacs for the cool things you can do with SQLi-mode and
shell-mode. Once in a great while I have to edit something on a machine I
can't TRAMP to and I use vim, and then my fingers are completely shot for
about an hour because they keep trying to type esc :wq instead of C-x C-s.

------
zokier
I'd be interested to know how much of the stuff presented in the article is
actually present in plain vi (not vim). If you mean vim, then say vim, not vi.
They are two different things.

~~~
dasil003
What's the biggest OS distribution that does not have vi mapped to vim by
default these days?

~~~
adient
Last time I installed Arch, it did not. Also checking Scientific, it does not
(assume also RHEL/CentOS).

~~~
MatthewPhillips
Arch definitely doesn't. sometimes I accidentally type vi and am confused for
a few seconds why things dont work right. Luckily an alias will fix it.

~~~
graywh
Is it a case where vi is a version with the tiny feature set and vim has a
larger (huge) feature set?

~~~
telemachos
Sounds reasonable. I was about to guess a similar thing. A minimal Debian
install (perhaps Ubuntu and other child-distros as well?) installs a vim-
tiny[1], which often throws people off[2].

[1] <http://packages.debian.org/squeeze/vim-tiny>

[2]
[http://www.google.com/search?client=safari&rls=en&q=...](http://www.google.com/search?client=safari&rls=en&q=site:forums.debian.net+vim-
tiny&ie=UTF-8&oe=UTF-8)

~~~
graywh
But Debian, etc. updates /usr/bin/vi to point to the Vim with the most
features.

------
itmag
What I want to know: how good is the best autocompletion available? Does it
stack up to Visual Studio's Intellisense? (For statically typed languages,
that is; Intellisense doesn't work very well for eg Javascript).

~~~
mattmanser
To be completely honest if you were impressed you shouldn't have been. Learn
your IDE!

Apart from the douchey tone of the article, the thing he misses is that most
editors can do this stuff, you've just got to make a bit of an effort to find
out how.

Emacs/Vim _force_ you to learn this stuff as they suck without it. That's one
of the big difference between Vim/Emacs and others, people don't realise they
can do so much more with IDEs.

For example in VS2010 with the MS productivity tools extension:

Example 1: Use ctrl-shift-r/ctrl-shift-p (temp macro), actually less typing
than his example due to auto-bracketing. Also learn how to use snippets.

Example 2: I'm dubious on the value as believe this would require cognitive
effort that I'm using for the code. I suspect hunt-and-peck (and only 4 or 5
keystrokes using ctrl-arrow at that) is probably better than switching mind
modes to figure out the best cmd. For example won't handling
_entry.key().equals(qk.key)_ instead require different keystrokes, hence
thought?

Example 3: Use End, Shift-Home or Home, Shift-End instead

Example 4: Use home, end, ctrl-pageUp, ctrl-pageDn to mostly deal with this

Example 5: VS does this automatically on paste, so no typing at all required.
If it really struggles you can use shift-},tab to indent an entire block,
assuming starting on the { as the article does.

Example 6: VS highlights end tags automatically without you even having to
press anything, there's probably a command to select the enclosing block but
I've never looked as it happens so quickly I don't think it's worth the time,
here I just End, shift-upArrow a few times or go to the mouse. Deleting a
whole block of code generally requires some thought about what it was doing,
you're not in edit mode at the point of deletion. If you're looking for
multiples then ctrl-F (find) will highlight all instances of the word your
cursor is on, this is easier with productivity tools installed as it doesn't
open a dialog. And VS also has the excellent rename all instances of this
variable only in the right scope.

He keeps banging on about fingers staying on the home row, but I don't really
notice moving to the arrow keys, perhaps it's cognitively similar to switching
to/from insert mode.

I had to actually do all of them a few times to be able to write them down as
just like Vim/Emacs, that's all muscle memory to me now.

NB for example 5/6 I highly recommend changing the default colour of
highlighted start/close tags in C#, the gray MS uses is far too light given
how important it is. This is pretty much the only colour I have ever bothered
changing from default.

The other massive productivity thing in all editors if you didn't know it is
ctrl-arrow, moves along words instead of single instances. Holding shift works
as expected and you can hold shift-ctrl with one little finger. But I'm sure
everyone knows that one.

In regard to the productivity tools, I would turn off the auto-correct mixed
tabs as it moans all the time when you look at downloaded code and also 'Quick
Access' too as that's annoying.

All that power without months of learning a new way of using a text editor.

~~~
weaksauce
Example 1: use q to make a macro and then invoke it with @ and it would be
even less typing. There are many, many ways to edit in vim.

Example 2: If you press dW it deletes the whole word. which would be the
entire entry.key().equals(qk.key) string. dw would delete up to the period.
d2f) would delete up to and including the second right paren from where you
are. I personally use delete whole word a lot.

Example 3: the di> would delete everything inside the brackets even if they
spanned multiple lines. you also can be anywhere inside the bracket and this
will still work. This also works with other types of tags. di) would do the
same for the current level of nested parens.

Example 4: really only offering one way to do granular navigation vs. many
different ways that might work for a particular situation. learning them is
not that hard when you take into consideration the mnemonics involved. you
need to learn some verbs to be effective: d is delete, v is visual, c is
change, w is word, f is find, t is find unTil, p is put, y is yank, a is
after, b is back, etc....

Example 5: There are plugins that can do this automatically in vim too. The
larger, more interesting thing is the ability to do entire operations on text
blocks and I think that is more important than the particular case of
automatic indenting.

Example 6: you can also get a plugin that does the highlighting automatically.

The fingers on the home row is pretty awesome. there is a cognitive load to
navigation to precisely put your hands on the arrow keys correctly. To get
back to normal mode you can either slap the escape key(not as good) or remap
escape to jj(or some other not commonly used key sequence) while in insert
mode.

The macro system in vim is excellent. everything is text so you can look at
the macro commands and edit them if you made a mistake. There are a lot of
registers(basically named clipboards that you can use to copy and paste text
the " is the default clipboard when you don't actually specify a yank target.)

Your point was that the ide is great and can do all that vim can do, but you
only showed that aside from some special case things with snippets and auto
indenting. After you have gone past the special case stuff that your ide can
do you have to resort to hunting with the arrow keys.

You can be productive in macvim quite quickly as it affords all the fun copy
and paste stuff like you are expecting to have at the os level but still have
all the vim goodness underneath. at the end of the day go for whatever you
feel most productive in but there really is a reason that after you get
competent with vim/emacs you are extremely productive.

~~~
mattmanser
You kinda missed the point of my comment, it's just demonstrating that there's
nothing amazing about any of his examples.

I'm not denying some things are faster in vim, but other things are slower.

What I take umbrage with is when someone posts a load of examples like this
where they can all be done in your favourite IDE but the author's just too
lazy to find out if they could be and so declares the magic of Vi or Emacs
compared to [insert everything else here].

Often it's like saying 'look my car's got windscreen wipers, all your cars
suck'. Um, mine has windscreen wipers too dude.

See my response to vacri, if you've any examples, please do share. I honestly
will switch if I could see a sizeable productivity gain.

~~~
losvedir
To be fair to the author, the post is to convince people to use viemu, his
product which gives vi controls to _Visual Studio_. So, I think he probably
agrees with you with regard to IDEs.

------
rwos
Reading the article and the comments here, I came to the conclusion that I
seemingly don't really use vi. As in: I don't live in it.

On a typical day, I work with my files using grep, awk, bash, python, sed,
make, cat, xargs, etc. And, of course, vi.

But I don't really use it like some (most?) people here seem to do. I don't
list and navigate through files in vi (I use tree, ls and find for that). When
I use vi, it's mostly for short bursts of manual editing. Occasionally, vim's
syntax highlighting comes in handy - but that's about it.

Don't get me wrong: that is exactly why I _love_ vi. It starts fast[0]. It
fits in pretty well with the rest of the unix environment (it can read stdin,
for example; and with vim you can open multiple files given on the command
line - and you can construct that file list with any of the standard unix
tools, of course).

So, for me, the question "IDE or vi" ends much earlier. I don't even come to
the point where I could discuss editing features. Can't read from stdin?
Doesn't start in less than 1 second? Doesn't fit into my work-flow.

Of course, vi(m) is a great editor, for all the reasons mentioned here and in
the article. But the unix user-land has some great tools, too. And it includes
vi. So it is by definition an even better editor than vi. :-)

So that's what I use.

[0] Believe it or not, emacs starts still too slow for me. These one or two
seconds tend to disrupt me a lot (I've tried it, with GNU emacs). And, as I
said before, I invoke my editor pretty often, maybe 50 times a day.

------
davvid
If you use vim then I highly recommend mapping spacebar to page-down and
shift-spacebar to page-up. This key is kinda useless otherwise and super-
helpful afterwards. It is also the largest key on your keyboard. usability++

    
    
        nmap <space> <c-d>
        nmap <s-space> <c-u>
        vmap <space> <c-d>
        vmap <s-space> <c-u>

~~~
platz
Im a fan of using the spacebar as my leader key.

------
javajosh
I'm realizing that the distinction between vim/emacs and typical IDE editors
is entropy. Vim is extraordinarily precise - very low entropy at all times. An
IDE editor is constantly moving between high entropy (e.g. mouse motion) and
low entropy (e.g. the interpretation of the mouse motion as a precise
command). This implies that vim appeals to minds that desire constant
precision, and GUI editors appeal to minds that prefer to vacillate between
levels of precision.

Decoupled from this is the question of which pattern of thought lends itself
to being a better programmer. There is a good argument either way: staying at
a very precise level of thought is wonderful when solving problems; and yet it
is better to loosen up when figuring out which problems to solve.

I tend to take the view that a programmer's actions while programming should
ideally be unambiguous, precise, and regular at all times. Higher level
thought should have a distinct place, time and another set of tools (pencil
and paper being foremost among the alternatives).

~~~
maxerickson
Is such a split between types of minds a real thing?

~~~
javajosh
That is my belief, although it is based on anecdotal evidence. Some (most?)
hackers enjoy descending into and inhabiting continuously a low-entropy mind-
state. There are others that would rather maintain some sort of fluidity
between states, as inhabiting that low-entropy mind-state tends to come at the
cost of human connectivity.

------
boofar
There are some video tutorials by Derek Wyatt that have been recommended on HN
a few times:

<http://www.derekwyatt.org/vim/vim-tutorial-videos/>

~~~
jjcm
Vimcasts is also a nice series of video tutorials, and the author's accent is
lovely to listen to.

<http://vimcasts.org>

------
brown9-2
One of the great things about vim is that even if you use it as your regular
editor (I use MacVim), you tend to learn something new every time you read a
new article. Today I learned about the '.' command.

Also, old discussion on same article:
<http://news.ycombinator.com/item?id=151637>

~~~
qdog
Yeah, I've never used the autoindent command before, either. Oops.

Been manually indenting stuff with :<line1>,<line2>,s/^/\t/ for years now,
oof.

~~~
jjcm
= will also indent any selection you have automagically. gg=G will do your
whole document, and V[selection]= will give you a selection range to indent. <
and > are nice as well for indenting specific amounts in the left or right
direction.

------
daniel_iversen
I really don't get how its more efficient than a modern editor!

I use vi(m?) when I am working on a unix/linux/mac terminal and have done so
for 10+ years. But I never bothered learning it properly so I only know a
handful or two of commands. So I can't appreciate both perspectives clearly.

However, how can it be faster and more efficient to edit in vi than in a
modern editor? I'd assume that if you can use multi gesture scrolling, point
and click location, the modern editor type keyboard shortcuts (with multiple
keys pressed) that it would lend itself to be faster to work with and more
"efficient" somehow (hard to explain).

Would love to know what vi-people think about that because I am most likely
wrong (as I said, very one-sided experience) but would love to get that level
of detail (I don't think the story was iron clad on that point).

Is there anyone who has switched from many years of very happy vi onto modern
editors and love that more?

Thanks..

~~~
blindhippo
I've used Vi(m) enough to know that I'm far more efficient in an editor
designed to work with my OS.

Knowing Vi (or Emacs) is essential as a software developer, but using it as
your local code editor has never made sense to me.

What most people who pontificated about Vi/Emacs/editor-of-choice often fail
to realize is that there isn't a "One True Way To Do Things Bestest". Everyone
works differently. Using Vi for 30+ hours isn't going to make me a better
developer - and it certainly isn't going to speed up anything.

------
AdrianRossouw
I've been using vi for 10 years and i didn't know about the '.' command. I've
been writing macros whenever i needed to do stuff like that.

~~~
manuscreationis
It seems quite powerful, but overall vi still overwhelms me with all the
options and functionality...

I'm trying to learn more about vi/m (and emacs) as I get more into Linux
development, but I think a lifetime of Windows has damaged me, mentally

~~~
yogsototh
In fact learning vi/m is a lot like learning to play a music instrument.

It is a pain to start using vim. But if you reach a certain level you start
improving more and more. Concerning vim, it should takes some weeks to be as
efficient than with notepad.

I written this article which also might help you:

[http://yannesposito.com/Scratch/en/blog/Learn-Vim-
Progressiv...](http://yannesposito.com/Scratch/en/blog/Learn-Vim-
Progressively/)

Don't give up! It will pay faster than you think.

~~~
re_todd
Honestly, when I was younger, I used to use vim when collaborating with other
programmers to impress them, and then use an IDE most of the time when noone
was looking. But then something strange happened, I began building up the
muscle memory and eventually preferred using vim over an IDE. It seems like
every year, if I take the time to learn more about vim, I become twice as
effective as the year before. There seem to be an infinite amount of new
things to learn, constantly making my life easier. I've been with it 4 years
now, and will never go back to an IDE.

The coolest thing I learned this year is the '. command, which will go to your
last change. So, you can be editing a program/script, run it, and it has an
error. Most of the time you want to go back to the last modification, so just
type: '. This even works, at least on my system, after closing and re-opening
the file. Related to that, you can type g; and g, to go through next/previous
modifications.

------
techiferous
I want to meet a dvorak keyboard user who is passionate about vi.

~~~
TomasSedovic
Pleasure to meet you. Not sure how much passion you require. I'm not exactly
head-over-heels with vim, but I have been using it for about 7 years and
dvorak for about 3.

Anything in particular you want to ask?

~~~
dasil003
I imagine the mnemonics make it work reasonably well, but what about hjkl? Do
you really get used to having those spread around?

~~~
TomasSedovic
Yeah. Adjusting to typing in Dvorak took me considerably more time and effort
that getting used to the new shortcuts.

Luckily, Dvorak isn't that bad for this. For instance, 'j' (down arrow) and
'k' (up arrow) are still next to each other, in the same order.

'h' (left arrow) and 'l' (right arrow) are not, but when you have your right
hand in the starting position, their location and distance is very similar to
where they are on QWERTY.

As a side note, it's much harder to type QWERTY on Dvorak.

Now, the arrow keys no longer in the same place -- up/down is on the left side
of the keyboard whilst left/right is on the right side.

But that's not as big a problem as you may think -- provided you keep both
your hands on the keyboard. Interestingly, the Kinesis Contoured keyboards [1]
have the arrows similarly separated.

And there are no "gotchas" where the keys' position would go against the
spatial intent.

You could imagine a layout that would for instance have ctrl-f (page down)
located below ctrl-b (page up) or 'h' (left arrow) on the right side of 'l'
(left arrow). But that's not the case in Dvorak neither for vim nor for the
emacs keybindings that I'm familiar with (c-b, c-f, c-a, c-e). Sheer dumb
luck, methinks.

Both under vim and under Gnome in general, I've found that all the shortcuts
I'm using aren't that much worse off. Some are actually better. It seems to
pretty much balance out.

[1]: <http://www.kinesis-ergo.com/advantage.htm>

~~~
tikhonj
Heh, not at all related, but do you really find it harder to type qwerty? I
personally find that typing a bunch of letters that are all beside each other
is actually _harder_ than typing normal words.

------
nik_0_0
Interesting article, I have always been interesting in moving to Vim, and this
article all but sealed the deal for me. The only problem being I don't really
see how useful this would be for general notepad usage. I understand the
author of this article is selling his plugin for Visual Studio, and this is a
marvellous way to do it. Is there any other way to integrate vim with Visual
Studio 2008 without purchasing his ViEmu? I would love to start learning vim
but I doubt a trial would be enough, and I don't see most of the other
attributes he covered ('.' for example) being very useful in daily notetaking.

~~~
mmavnn
Try VsVim if you're on VS2010.

------
un1xl0ser
First, you understand how and why it is modal. Then you learn simple commands
for movement and editing.

Then you learn all the meta-commands. All of these building blocks are only
limited by your creativity of combining them to get what you want done. The
more commands and tricks you know, the more you can slice and dice text, code,
logs, whatever inside your editor (without leaving it).

I guess it's just a Unix/neckbeard thing. This is how the rest of Unix is
designed, so why not the editor.

------
Aga
A couple of years ago I was recommended to read this article as I was doubting
if vim was anything for me. It convinced me to give it a try and after two
weeks of learning it felt I could never go back. Since then I have vimified
everything I can.

Later I have recommended this article to others of whom some have had similar
experiences...

The author does a fine job describing the vim-philosophy instead of just a bag
of tricks.

------
Jayasimhan
I wish every editor/language/product could have a blog like this that
explained the philosophy behind its design.

------
becasse
This article has been linked to 1,210 times on hacker news alone since it was
first published 4½ years ago (according to Google:
[https://encrypted.google.com/#sclient=psy-
ab&hl=en&s...](https://encrypted.google.com/#sclient=psy-
ab&hl=en&source=hp&q=link:http%3A%2F%2Fwww.viemu.com%2Fa-why-vi-
vim.html+site%3Anews.ycombinator.com)).

It's fascinating how excited people get when given the chance to talk about
their favourite editor!

Further down in the comments it always gets to the point where someone asks:
"Yeah, I'm trying to learn vi, but how do you delete 3 lines?", or something
like that.

Reminds me of this article: <http://rachelbythebay.com/w/2012/01/16/replyall/>

------
nateberkopec
That "vi gang sign" is a real shocker.

~~~
sarcasmatron
I didn't want you to think your comment had gone unnoticed.

Well played.

------
Karunamon
I used to be in the "eww, vi" camp before taking a sysadmin job that basically
forced me to use it. I used to remove vi at my first opportunity and link
/bin/vi to nano instead.

Well, almost a year later, and I can't use nano without being irritated. All
of the jumping around the keyboard for functions seems really inefficient all
of a sudden.

Vim - :wq! :D

Nano - C-o <ret> <ret> C-x >:(

Probably the reason that emacs feels so wrong right now, though I'm doing my
damnedest to become at least basically proficient with it, if nothing else for
all of the ancillary features (like a really nice IRC client or the best text-
mode organizer I've _ever_ seen).

------
TheCapn
I guess a nitpick on the article. When you say a "Steep learning curve"
doesn't that mean the time to learn is quick? (Think X/Y plot with Time being
independant, steeper slope indicates faster learning?)

~~~
esrauch
He is using "steep learning curve" correctly, in your example X-axis is what
you want to achieve and Y-axis is how much you need to know to achieve it. The
beginning part is a sharply increasing line for vim, you have to learn more to
achieve the same amount on the low end.

------
cjr
I started attempting to properly learn vim a couple of weekends back, watched
a load of vimcasts (<http://vimcasts.org>) and got my vimrc file all set up,
but rushing to get things done before a release meant I switched back to
sublime within a couple hours. Perhaps not the best timing!

Can anyone recommend a good plugin for switching between files frequently - as
in the Command-T shortcut in textmate/sublime. I did try the CommandT vim
plugin, but didn't find it as good as the implementation in sublime.

------
joshhart
In his first example, implementing a header file/interface is only CMD-I in
IntellJ. Everything else is done automatically.

I can understand why text editing is a big deal, but having an editor that
actually understands your code is a powerful thing. Think of an IDE as a
gigantic set of macros.

------
methodin
I believe I had two ah-hah moments about vim when reading this article. I love
those moments! How I never knew about ]p is beyond me! I guess I should assume
that something I'm doing that is annoying means I'm doing it the wrong way.

------
CJefferson
At this point, particularly on news.ycombinator, surely the article should be
about "Why, oh WHY, do those #? nutheads not use vi?". It seems a majority of
people believe it is better, certainly a majority of the vocal crowd.

------
alimbada
I'd love to use ViEmu or VsVim, but it'd confuse the hell out of my team
members if we ever have to pair up. And then I'd be lumped with trying to
explain what it is to them when they barely even know what Unix is...

~~~
platz
Im waiting for this day to come for me, now.

------
tedkalaw
I grew to love vim after being introduced to it in my data structures class.

One of my favorite tools is much older than me - which seems kind of weird in
the current state of technology. I find it very humbling.

------
overshard
I thought this was a rant on hash bangs or GET request variables and the
coloration between them and people who use VI...

------
Zakharov
Wow, I used vim for five years and never knew about '.'. Glad to have found
this article!

------
platz
ViEmu or VsVim?

------
funkah
> _The first time you stumble into vi or vim, you are shocked and disgusted
> that you have to use 'i' to start typing text. Can't remember which of hjkl
> moves in which direction. And you need to press 'a' if you want to insert
> after the last character of the line. Since you're already probably used to
> other editors, and if the arrow keys work in insert mode (they do if the
> system is configured properly, which is over 90% of the cases), you will
> stay in insert mode and not go back to normal mode except if absolutely
> necessary. You'll probably spend 20 minutes with it, and never go back._

All of this, except the 20 minutes part. I'd hate to have to spend that much
time with one of these "enlightened" editors. Just let me use my arrow keys,
please and thank you.

~~~
pyre

      > All of this, except the 20 minutes part. I'd hate
      > to have to spend that much time with one of these
      > "enlightened" editors.
    

Did you have this same resistance to learning when you learned the languages
you are presumably programming in?

"I'd hate to have to spend 20 minutes with Ruby, just let me describe my
program in 'real' language please."

~~~
recursive
> Did you have this same resistance to learned when you learning the languages
> you are presumably programming in?

Speaking for myself, no. My reasons for disliking "enlightened" editors are
similar to my reasons for disliking alternative keyboard layouts. If I can
only be fluent in a highly specialized environment, in a sense, my skills
become less portable. I like being able to walk up to someone's computer and
just use it or help them with their issue. I do care about editing efficiency
and superfluous keystrokes. But when I compared the keystrokes required to
complete the example to what I would use in my preferred editor, (Programmer's
Notepad) I didn't find the savings to be significant enough to warrant all the
pain of learning a completely separate UI.

And FWIW, if I was actually doing that example in real life, I'd be in my IDE,
clicking "Implement Interface", not wrangling text.

As for learning new languages, I enjoy doing it, and look forward to learning
new ways of approaching problems that new languages can provide.

~~~
pyre

      > If I can only be fluent in a highly specialized
      > environment, in a sense, my skills become less
      > portable. I like being able to walk up to someone's
      > computer and just use it or help them with their issue
    

This is a non-issue. There are no versions of Windows, Linux or OSX that allow
all text boxes to use Vi keybindings. The idea that if you started using Vi or
Emacs bindings in an 'enlightened' editor, that you would lose the ability to
edit textboxes on other computers is a straw man.

You could similarly say that you don't want to use VisualStudio because it
would affect your ability to help out Eclipse users or vice versa.

~~~
eru
Also typing in dvorak layout doesn't destroy your ability to type qwerty.

~~~
recursive
People that I know of that have personal experience do say it impairs it
though.

~~~
eru
I've certainly gone out of training on qwerty (or rather qwertz), but I was
never actively impaired. Though in the last few months I went down the even
more extreme route of getting a special keyboard not only an alternative
layout. The Kinesis Advantage.

By the way, learning vi is probably the most standard compatible thing to do.
Vi is a standard Unix tool, has been around for decades and will be around for
decades more. (Not that I use vi much myself.)

~~~
recursive
> By the way, learning vi is probably the most standard compatible thing to
> do. Vi is a standard Unix tool, has been around for decades and will be
> around for decades more.

This feels a little bit like the scene in Superbad, where McLovin proposes to
be named Muhammed to blend in, since it's the most common name in the world.
It may be the most common OS in the world, but it's none too common 'round
these parts. Off the top of my head, I can't even name two computers that have
vi installed. The first is my work computer on which I installed gvim for
another attempt after reading this very article.

------
kenrik
I used to use vi but I did not like it, now I use nano.

------
nerdfiles
Vi/m is a funny hat that I put on and that gives me powers. Let's call it
meta-learning! I'm writing code; now, I'm writing code with a funny hat on.
_This_ computer's funny hat!

The great thing about Vi/m is that it compels you to read by withholding input
entry. Key-bindings are secondary, but no less significant in that you can use
two different object languages for dealing with text. Being forced to read
through navigation of text with a robust language aids in presenting analogies
to the coder. Who is entering the text? Does VISUAL feel like a finger
pointing at the screen?

------
no-espam
Vim is great but learning requires a good investment of time. If somebody
tells you, you can be as productive as with your current editor in a few
weeks, don't believe it. If all you need is notepad or gEdit, Vim is not worth
the debt. Spend your time learning another language or create an open source
project.

I live in a terminal so Vim is my weapon of choice. I tried and bought a
license for Sublime 2, which is awesome n vintage mode, but Sublime is not
Vim.

------
mammadori
Why is that a NEWS?

It seems quite old to me.

