
Vim: Seven habits of effective text editing (2000) - adambyrtek
http://www.moolenaar.net/habits.html
======
okket
Previous discussions:

[https://news.ycombinator.com/item?id=15532457](https://news.ycombinator.com/item?id=15532457)
(~2 months ago, 237 comments)

[https://news.ycombinator.com/item?id=4620065](https://news.ycombinator.com/item?id=4620065)
(~5 years ago, 66 comments)

All submissions:
[https://news.ycombinator.com/from?site=moolenaar.net](https://news.ycombinator.com/from?site=moolenaar.net)

~~~
aidos
Your first link is actually only a couple of months ago

~~~
okket
Right, sorry, correcting it now.

------
jmcphers
For programming, I've found that my time spent navigating the code dominates
the time I spend editing it. Bram's recommendation is to generate a tags file
right away for every project to keep this time down, and it's excellent
advice.

The problem with this, however, is that it's a pain to remember to generate
and update the tags database. Thankfully, you can configure Git so that it
builds a tags database for you automatically whenever you clone a repo, and
updates it in the background every time you commit, pull, or push.

Instructions here from Tim Pope:

[http://tbaggery.com/2011/08/08/effortless-ctags-with-
git.htm...](http://tbaggery.com/2011/08/08/effortless-ctags-with-git.html)

I'm partial to GNU Global, myself, which adds a basic "find references"
command, slightly better parsing, and incremental DB updates. Also relatively
easy to set up for effortless navigation:

[https://csl.name/post/gtags/](https://csl.name/post/gtags/)

------
wildflowero
I must ask: how many people actually use the right shift key when typing? I
have grown accustomed to only using my left and was wondering if others shared
this behavior.

~~~
dsego
I do. Started with only left, but fixed with deliberate practice .

------
SamPutnam
_A couple of things to watch out for when you are using these three steps:

"I want to get the work done, I don't have time to look through the
documentation to find some new command". If you think like this, you will get
stuck in the stone age of computing. Some people use Notepad for everything,
and then wonder why other people get their work done in half the time..._

It's not directly related to vim, but... Some tool you use will _always_ seem
extraneous to someone further down the stack with more experience than you...

I remember at the beginning of my coding career asking a software engineer
what IDE was the best and getting back the answer, "you don't need one, you
can do everything in NotePad if you want."

(Suffice to say the impetus to go home and _want_ to start coding from a blank
NotePad file that night was dead on arrival.)

Now, if he had asked me why I was asking what IDE was best, I would probably
have said "I want to create something as quickly as possible that helps me
understand what code does," and then I would have been off to the races.
Googling and learning along the way...

------
gshakir
If there was a eighth one, I would add learning to touch type. Groking VIM
becomes easy when you can type fast.

~~~
brucephillips
Do there exist modern information workers who can't touch type?

~~~
e12e
I'm very happy I attended an optional touch type class in high-school (on
typewriters, actually). My recommendation for kids would probably be to learn
to touch type, on a better layout (eg dvorak, colemak, workman).

Either way, proper touch typing is more than typing fast, it's also about
"sustainable typing": posture, strain, reducing rsi - as well as being free to
copy (read text to type in, not having to look at the keyboard or the screen
where typed text is displayed).

I've not met many people that proper touch type, even programmers. Even if
being able to copy a page of example code from a magazine/book is a useful
skill.

~~~
brucephillips
You're describing ergonomics, not touch typing.

~~~
Moru
Ergonomic typing is usually part of the touchtyping class. At least when I was
in school 30 odd years ago. I think it was obligatory for everyone but can't
remember any grades. Most didn't bother though. (Sweden)

