On Mon, Jan 10, 2011 at 2:29 PM, Benjamin R. Haskell <[email protected]> wrote:
> On Mon, 10 Jan 2011, Jeffrey 'jf' Lim wrote:
>
> hi, I'm having trouble (is it possible?) trying to figure a way of
>> repeating a "shift" for a line quickly. Essentially, I want to be able to
>> shift the current (and only the current) line multiple times (let's say 5
>> times)
>>
>> I've tried the following:
>> 5>>
>> => results in 5 lines being shifted
>> >>5.
>> => results in the current line shifted once, and then with '5.' 5
>> lines being shifted
>>
>> The only key combination I've found that works (although not as efficient
>> as I would like) is '>l', and then '5.' to repeat. Is there anything better
>> than this?
>>
>> I would have expected '5>>' to just do the shift 5 times _for the
>> *current* line_ - rather than its behaviour now of shifting 5 lines.
>> Especially when I can shift 5 lines with '>4j' (so it makes more sense to
>> interpret '5>>' as shifting 5 times for the current line).
>>
>
> I also would have also expected 5>> to shift five times.
>
>
yup. Same here. I think it's more intuitive to interpret it as "shift 5
times for the current line".
> Not sure that it's "better", but an alternative way to shift right five
> times:
>
> V5>
>
>
V starts linewise visual mode, and in visual mode [count]> behaves as you
> and I had expected.
>
> :h v_>
>
>
wow, thanks!
*Some extra curiosities ( ;P ):
- you can just do v5> (thereby avoiding the extra shift) as well. I guess
what matters in this case then is the trigger of the visual mode (whether by
'v', or 'V').
- <C-v>5> works too - except that it inserts 5 tabs where your cursor is!
(which is probably not what you want, since that means that your cursor
position is crucial, unlike with v5>)
-jf
--
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."
--Richard Stallman
"It's so hard to write a graphics driver that open-sourcing it would not
help."
-- Andrew Fear, Software Product Manager, NVIDIA Corporation
http://kerneltrap.org/node/7228
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php