

Seven habits of effective text editing - olalonde
http://www.moolenaar.net/habits.html

======
h2s
A few developers I've known have made the case that they just don't see text
editing speed as the bottleneck in their day-to-day work. They're perfectly
happy with the speed at which they can edit text and that's fine. What gets to
me a bit is the dismissive attitude this type of developer tends to take
towards usage of Vim, as if using it makes me some sort of misguided autist.

The reason I think it matters is that there are a limited number of hours in
the day. When I get home from work I have maybe three or four hours on a good
day to make some progress on my own projects. If during that time I can save
10 minutes of holding down arrow keys and carefully maneouvring the mouse
cursor around my code and so on, then in a week that's an extra hour or so of
extra project time.

~~~
oelmekki
> They're perfectly happy with the speed at which they can edit text and
> that's fine.

I think they miss the point. Speed editing with vim is not about how many
lines you may produce in the day.

It's about the lag between the moment you think about what you want to write
and the moment when it's written. Your editor should not be in the way, and
that's what vim, when mastered, is all about : you simply don't think about it
anymore.

It's for the same reason that vim tries to reduce hand movements, so you won't
feel your editor in those extra displacements.

~~~
minikomi
Also, it's extremely satisfying to record a complex macro and then 100@@ it
across a wide swath of your file

~~~
dasil003
One of my favorite tricks was binding @q to <space>. It really speeds up
playback so I don't need to necessarily count occurrences or go recursive.

------
eta_carinae
> A few developers I've known have made the case that they just don't see text
> editing speed as the bottleneck in their day-to-day work.

Right, it's only a bottleneck if you use the wrong tool for the job. As much
as I love vi for text editing, it is the wrong tool for HTML editing and for a
growing number of other file types for which more specialized editors exist
(e.g. Eclipse for Java).

I know that vi experts think they are very fast with vi but they are wrong: if
you are using vi for anything but simple text files, you are not being as
productive as you could be and you should really consider being more mentally
flexible and use the right tool for the job instead of vi for every job.

~~~
VeejayRampay
The best programmers use either Emacs or vim. vim goes way beyond "simple text
editing" you don't seem to know what you're talking about.

~~~
mcantor
No! No, no, no, no, no. The best programmers use _whatever they use_. You are
making the same mistake as the guy you're replying to. There is no one best
way. We need to get over this mentality as a community. I don't mean to pick
on you, as this was clearly just an off-the-cuff comment, but this kind of
dialogue is simply worthless. I agree that the grandparent poster seems pretty
clueless about vim and its ilk, but an equal and opposite reaction that's just
as subjective and baseless will get us nowhere.

------
lordlarm
A great resource in order to learn new key bindings and be more efficient in
Vim: <https://www.shortcutfoo.com/>

Great article by the way. I enabled "hlsearch" and added "map <CR> :noh<cr>"
in order to exit the highlighting by pressing return.

~~~
alwillis
shortcutFoo is pretty slick. Bookmarked.

------
prawks
What I love most about vim:

Whenever I read an article like this I find solutions to problems I didn't
even know I had. The _abbr_ trick is awesome!

~~~
aerique
I've always prefered to retrain myself instead of using abbreviations because
I was afraid I would need increasingly more of them because of the abbr
crutch. However I have never heard of this happening to anyone. Does anyone
have any experience with this?

------
white_devil
.. Or you could, you know, just use whatever IDE is appropriate for your
language and _be a lot more productive than you ever could with Vim_.

~~~
mcantor
I know this is bonkers, but maybe some people are more productive with GUI
IDEs and some are more productive with vim and a terminal multiplexer.

~~~
koningrobot
Possibly, but I doubt that that is ever the reason for choosing one over the
other. These productivity claims only serve as rationalizations of choices
already made.

~~~
mcantor
I opine that we're more productive with our tools of choice _because_ we chose
them. And that's perfectly fine. We can claim that everyone else would be more
productive if they used our unique cocktail of tools and techniques, but the
irreducible fact that they do not _want_ to is proof enough of our error.

------
mcantor
Trivia: This is written by Bram Moolenaar, maintainer of Vim (the trivia part
is that he maintains Vim; hopefully it's quite clear that it was written by a
guy named Moolenaar).

~~~
Evbn
And original author.

------
blahedo
The great thing about vi[m] is that even after twenty years of using it, as my
primary editor for everything (paired with LaTeX for document generation, mutt
for email, etc), and much of that time spent teaching students how to
effectively use it, I _still_ sometimes learn about useful commands that I
didn't know about. (Today: asterisk to jump to next occurrence of current
word.)

~~~
ColinWright
... and hash to jump backwards to previous occurrence of current word.

------
crazydiamond
Vim lovers would love Steve Losh's Coming Home to Vim:
<http://stevelosh.com/blog/2010/09/coming-home-to-vim/>

This was on HN a couple years back.
<http://news.ycombinator.com/item?id=1710702>

------
jodrellblank
How much of this is because we still can't have a button which "puts the
cursor where I'm looking".

(Or that we can't touch where the cursor should be).

"Go to the next instance of this word, wherever that is" is helpful; having to
proxy a leap to somewhere you are looking at, through a vim command, still
seems suboptimal.

------
Evbn
> Bram Moolenaar is the main author of Vim.

Note that this article was written in 2000. 12 (!) years later, we have
amazing plugins that make :make rather quaint.

Most important vim command?

:help uganda

