The most productive mapping ever: imap jj . No more having to reach for the escape key.
How to boost your Vim productivity
101–110 of 130 posts
Re: How to boost your Vim productivity
#102Step 1 for those who really want to boost productivity (but let's be honest, most of us don't!): forget about all those plugins that are time sinks to configure and integrate with each other, about obscure tweaks that take half a day to get right, and about elaborate .vimrc's that take you so far away from 'standard' that you're crippled without them. Stick to a fairly basic standard install and a .vimrc of 50 lines,…
Without stuff like that I'm still fine should I find myself on a remote machine. But I don't see an issue with making myself more comfortable than just being 'fine' on my personal setup where I spend most of my time.
I think the key is to vet your plugin and mapping choices to ones that expand upon vim in some way and avoid those that override core functionality or prevent you from learning them. If you do that you should be fine without imposing an arbitraty vimrc length.
Re: How to boost your Vim productivity
#103Does anyone have any advice on bindings to change split size? Ctrl-w + and Ctrl-w - just don't work well, and my current configuration shadows Ctrl-a, which I really would like to avoid.
Re: How to boost your Vim productivity
#104The most productive mapping ever: imap jj . No more having to reach for the escape key.
Even better: imap jk imap kj I just hit both and j at the same time with my pointer and index fingers so it's essentially one keystroke.
Re: How to boost your Vim productivity
#105Earlier quoted context omitted.
Even better: imap jk imap kj I just hit both and j at the same time with my pointer and index fingers so it's essentially one keystroke.
How does this work? What if you are in insert mode and actually want to type j or k?
Re: How to boost your Vim productivity
#106Earlier quoted context omitted.
when I learned about f and F a whole new world opened up for me. It never ceases to amaze me how amazing vim is. Another quick thing I recently learned (yes, novice vim user here) is stuff like this \includegraphics{test.png} if you stand inside the curly brackets and type ciB (change in Brackets) you get this \includegraphics{} with your cursor active inside the brackets, just awesome ..
TIMTOWTDI: ci{ does the same (I think of "B" as beginning of a Word [including punctuation], so it would confuse me to use the "B" meaning braces)
Re: How to boost your Vim productivity
#107The most productive mapping ever: imap jj . No more having to reach for the escape key.
Map Caps Lock to Ctrl. Then use Ctrl-C. You can keep your hand in home row.
The only pitfall is when you start using someone else's computer and putting caps everywhere.
Re: How to boost your Vim productivity
#108Earlier quoted context omitted.
Isn't :%s/.)/hello)/ simpler? Maybe that's because I know nothing about macros. Thanks for the explanation.
Pardon, it might have been a trivial example. I managed to find a real-world example I encountered in February this year. The PAPI library has a utility program papi_avail which prints a table of supported performance counters. The lines may look like this: PAPI_VEC_SP 0x80000069 Yes Single precision vector/SIMD instructions PAPI_VEC_DP 0x8000006a Yes Double precision vector/SIMD instructions PAPI_REF_CYC 0x8000006b…
{ down { down {
to insert all three leftmost brackets. up up up
to go to first bracket. shift+left
to select first bracket. cmd+d cmd+d cmd+d
to select all three next brackets including the first. ctrl+shift right
to move all three cursors to the end of word. comma space "
to type your characters with all three cursors. cmd+right
to go to end of line with all three cursors. " } ,
to type your characters with all three cursors.21 presses (29 keys), compared to your 32. And all I had to think about was where the cursor was.
(Not to be pedantic, of course!)
Re: How to boost your Vim productivity
#109Re: How to boost your Vim productivity
#110The most productive mapping ever: imap jj . No more having to reach for the escape key.