blockwise visual mode in a mapping?
- I can't get blockwise visual mode (CTRL-V) to work in a mapping.
Can someone please tell me how I can do this? I'm trying to indent
a block of code by using BVM and the "I" command. Perhaps there is
a better way of doing this?
Thx as always
| Pete Bismuti |
| Department of Computer Science |
| Florida State University |
| bismuti@... (850) 644-6835 |
- Peter Bismuti wrote:
> I can't get blockwise visual mode (CTRL-V) to work in a mapping.Exactly what are you trying to do, and what did you try? I did
> Can someone please tell me how I can do this? I'm trying to indent
> a block of code by using BVM and the "I" command. Perhaps there is
> a better way of doing this?
> Thx as always
map <F9> 0<C-V>jjI<Tab><Esc>
and then F9 indented three lines, as expected (starting in Normal mode).
You could also do
>2<CR>(starting from Normal mode) or
or lots of other things.
Note that, if you start in Normal mode and type 3: then you get
on the command line automatically.