Does 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.
^W20+ - increase the current window height by 20 lines ^W20> - increase the current window width by 20 columns :he ctrl-w edit: typo
How to boost your Vim productivity
51–60 of 130 posts
Re: How to boost your Vim productivity
#52Re: How to boost your Vim productivity
#53Earlier quoted context omitted.
...% to navigate quickly within a line. "%" works fine for moving around, but when I use it to edit it always surprises me, which direction it goes. I almost think vim is psychic, because "%" goes the wrong direction for me at least 80% of the time. There must be a deterministic rule governing this, but can anyone explain to me what it is?
Find first brace to the right of the cursor (be either an opening or closing brace) and jump to the matching one. If the cursor is at the beginning of a line of matched parentheses, % will go to the closing parenthesis of the first group, as in my example in a cousin comment.
Re: How to boost your Vim productivity
#54Does 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.
I rarely resize windows, but when I do, I set mouse=a and use the mouse to drag the window borders around. There's also CTRL-W _ (underscore) to maximize the current window and CTRL-W = to make window sizes equal.
Re: How to boost your Vim productivity
#55Does 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.
I rarely resize windows, but when I do, I set mouse=a and use the mouse to drag the window borders around. There's also CTRL-W _ (underscore) to maximize the current window and CTRL-W = to make window sizes equal.
immediately maps this to ctrl-w m
Re: How to boost your Vim productivity
#56Earlier quoted context omitted.
ICBW, but I believe Ctrl-[ is already available, and works the same. For me, having remapped Capslock to Ctrl, this is a dead simple way of hitting Esc without going as far off homerow.
I had jk mapped for a long time and thought it was safe. Then one day I actually had to type it as text, and it took me a moment to figure out what was wrong. I'm retraining myself to use ^[ now.
Re: How to boost your Vim productivity
#57Earlier 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…
/^\(\S*\)\s*\S*\s*\S*\s*\(\p*\)
:%s//{\1, "\2"},
"Now they have two problems."Re: How to boost your Vim productivity
#58Does 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
#59Does 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.
I also use mouse for resizing.