top | item 16092778

Vim: Seven habits of effective text editing (2000)

55 points| adambyrtek | 8 years ago |moolenaar.net | reply

46 comments

order
[+] jmcphers|8 years ago|reply
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...

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/

[+] wildflowero|8 years ago|reply
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|8 years ago|reply
I do. Started with only left, but fixed with deliberate practice .
[+] diabeetusman|8 years ago|reply
I actually only use the right shift and very barely use the left one myself
[+] Asooka|8 years ago|reply
I touch-type, so I alternate left and right depending on which letter I have to capitalise, i.e. I tend to use right shift for left-hand letters and left shift for right-hand letters. Except that being right-handed means I favour the right shift and use it also for letters typed with the right index finger.
[+] ashark|8 years ago|reply
I almost exclusively use left modifiers. I blame first person shooters.
[+] Ayaz|8 years ago|reply
I use both shift keys. Left shift key when the other key I need to press is on the right side of the keyboard, and so on. I also use both of my thumbs to press the spacebar.
[+] utsahi|8 years ago|reply
I use the right shift/ctrl/alt keys along with the keys under the left hand, and vice versa.
[+] Moru|8 years ago|reply
I use both, depending on what side of the keyboard the other character is on :-)
[+] barbs|8 years ago|reply
Yeah I only use the left one. I spose I should be using both?
[+] Avshalom|8 years ago|reply
Right shift yes but basically never right Ctrl/alt
[+] SamPutnam|8 years ago|reply
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|8 years ago|reply
If there was a eighth one, I would add learning to touch type. Groking VIM becomes easy when you can type fast.
[+] Moru|8 years ago|reply
I'm surprised this isn't the first. But I guess this is a clear given. Everyone should learn to touch-type, it's so easy and gives your mind the freedom to concentrate on whatever it is you are trying to accomplish instead of finding characters on the keyboard.
[+] brucephillips|8 years ago|reply
Do there exist modern information workers who can't touch type?
[+] barbs|8 years ago|reply
He does mention this at the end of the article.

One last remark to remind you of what happens when people ignore all the above: I still see people who spend half their day behind a VDU looking up at their screen, then down at two fingers, then up at the screen, etc. - and then wonder why they get so tired... Type with ten fingers! It's not just faster, it also is much less tiresome. Using a computer program for one hour each day, it only takes a couple of weeks to learn to touch-type.

[+] metaphor|8 years ago|reply
Admittedly, I had look up what was meant by touch typing; taken literally, how else would typing be performed--osmosis?

Didn't realize that it meant typing without looking at the keyboard. Would have thought this was a given, but in hindsight, I suppose the prevelance of the touchscreen interface probably has something to do with my false assumption.

[+] Ayaz|8 years ago|reply
Definitely. Using a computer becomes easy when you can type fast without looking.