After around 5 years of using vim, I'm at the point now where everything in this article and comment thread is already in muscle memory. My only advice would be similar to whats in other comments:
* Learn to touch-type
* Learn new features slowly, giving each of them time to find their place in your workflow.
My questions for other vim power users:
* What _epic_ custom mappings do you have? Steve Losh's <Leader>ev for editing .vimrc and <Leader>sv for sourcing completely changed how I use and customize vim... are the any others with that level of impact?
* How have you mapped control of buffers/windows/tabs? Command-T buffer mode takes care of open buffers, and the default window/tab control mappings seem good enough for me, but I'm wondering if there's a nicer way for this interaction to work. Currently I've got arrow keys mapped to moving tab focus, but it feels like their might be a better way here.
* Are there any fun and creative ways you've integrated with the shell/plugins? Here are some examples I've got:
<Leader>r :!rake
<Leader>rs :!rake spec
<Leader>rl :!rake spec (test near this line)
<Leader>gs :GStatus (fugitives 'git status')
<Leader>gb :GBlame (fugutives 'git blame')
* What's a nice way to do find in project? Both vimgrep and :Ggrep are OK, but I find it weird that I'm taken out of the editor for both of those... Ideally I'd like the results to open up in a buffer which I can then browse through in some nice way.
I've used vim for coming on 15 years now, so I feel that I may qualify as 'experienced'. My biggest productivity gain was giving up on endless customization after I had reached a certain proficiency (e.g., everything in the original article is rather basic vim usage) and comfortable workflow for specific development purposes (e.g. when switching to a new language, I spend some time setting vim up to solve the most glaring pain points and once it feels comfortable, I stop customizing). All the mucking about with various baroque plugins and ever-more-marginal keystroke-saving key mappings costs a lot more time than what can be gained from it. For example, I used to have a bunch of mappings that would insert documentation blocks in various forms. Just misremembering the mapping once a day causes enough workflow disruption to undo any gains from having them in the first place. Nowadays I just type comments / docblocks by hand. It's a few more keystrokes, but a lot more natural and flexible.
Also, staying as close as possible to the default settings makes it a lot easier to move to other environments and/or upgrade. Although now that I have my .vimrc in my Dropbox it doesn't matter as much as it used to.
I've only been using vim full-time for a year and a half, but I'm slowly ramping up on things like window and buffer management. Probably my favorite life-changing trick is the quick macro:
nnoremap <Space> @q
It dramatically lowers the mental barrier to macro use (at least when you're starting out with macros). Where I use to use ragex search and replace I now instinctively go for macros, and I'm getting good at choosing the most robust commands for the situation. The pattern of qq => /foo => cwbar => Esc => Space-Space-Space is incredible. It's so infinitely superior to regex search and replace, and the fact that you can paste the macro and modify it as text is the cherry on top.
Nice! I think I might add that to my .vimrc. The only thing I'd add about macros is that I generally use them for multi-line transformations (i.e. they usually end with `j`). This means you can record your macro and the run `n@q` where n=the number of lines you want to run it for and q=the register where your macro lives. This is useful for annoying, repetitive syntax transformation tasks.
Ah, I never have done a count on a macro before, but I do much the same thing with the @q bind. I have my key repeat rate set to maximum, so I can just hold down space and it flies down the lines.
I see you're using Command-T, but for anyone else, these remaps will list all buffers using F1 and quickly jump to b1..b9 using \1 .. \9, and toggle between alt buffers using \\, all in normal mode. Super handy and quick.
* Learn to touch-type
* Learn new features slowly, giving each of them time to find their place in your workflow.
My questions for other vim power users:
* What _epic_ custom mappings do you have? Steve Losh's <Leader>ev for editing .vimrc and <Leader>sv for sourcing completely changed how I use and customize vim... are the any others with that level of impact?
* How have you mapped control of buffers/windows/tabs? Command-T buffer mode takes care of open buffers, and the default window/tab control mappings seem good enough for me, but I'm wondering if there's a nicer way for this interaction to work. Currently I've got arrow keys mapped to moving tab focus, but it feels like their might be a better way here.
* Are there any fun and creative ways you've integrated with the shell/plugins? Here are some examples I've got:
<Leader>r :!rake
<Leader>rs :!rake spec
<Leader>rl :!rake spec (test near this line)
<Leader>gs :GStatus (fugitives 'git status')
<Leader>gb :GBlame (fugutives 'git blame')
* What's a nice way to do find in project? Both vimgrep and :Ggrep are OK, but I find it weird that I'm taken out of the editor for both of those... Ideally I'd like the results to open up in a buffer which I can then browse through in some nice way.