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.
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:
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.
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.
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.
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...
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.
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.
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.
[+] [-] okket|8 years ago|reply
https://news.ycombinator.com/item?id=15532457 (~2 months ago, 237 comments)
https://news.ycombinator.com/item?id=4620065 (~5 years ago, 66 comments)
All submissions: https://news.ycombinator.com/from?site=moolenaar.net
[+] [-] aidos|8 years ago|reply
[+] [-] jmcphers|8 years ago|reply
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
[+] [-] dsego|8 years ago|reply
[+] [-] diabeetusman|8 years ago|reply
[+] [-] Asooka|8 years ago|reply
[+] [-] ashark|8 years ago|reply
[+] [-] Ayaz|8 years ago|reply
[+] [-] unknown|8 years ago|reply
[deleted]
[+] [-] utsahi|8 years ago|reply
[+] [-] Moru|8 years ago|reply
[+] [-] barbs|8 years ago|reply
[+] [-] Avshalom|8 years ago|reply
[+] [-] SamPutnam|8 years ago|reply
"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
[+] [-] Moru|8 years ago|reply
[+] [-] brucephillips|8 years ago|reply
[+] [-] barbs|8 years ago|reply
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
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