Re: map problem in Vim 6.0
- I think you can use macros (registers) and mapping.
Try to change the mapping to:
map C :<c-u><CR>0i#<Esc>j
and then use macro (for Ex. c , but you can chose any letter you want):
Now you can type:
and i think you will get 10 lines commented.
Greg Roll wrote:
> I'm trying to setup a mapping in my .vimrc file to allow be to block comment
> / uncomment lines of code in a perl script. I'm using the following
> commands:map C 0i#<Esc>jmap T 0xjThese work fine when I issue them one by one,
> but if I try to repeat the command... by typing '10C' instead of repeating
> the command an commenting the next 10 lines... it appends this number to the
> start and I end up with 100 # marks on my line.... How can I make vim
> recognize to repeat the entire mapping?Greg Roll