>> aaaa  : b123
>> cccc  : d456
>> eeee : g789
>>
>> When I then press the down-key its position to insert a character 
>> between 5 and 6.
>> Is it possible to remap so that it goes to the postion between the 
>> <space> and the d?
> 
> In this case I don't quite understand what (which key sequences) you want to 
> remap <Up> and <Down> to: once you figure that, how to achieve it should be 
> obvious.


I think the OP is looking for something like

        :nnoremap <down> <down>0f:w

which will position the cursor at the beginning of the first item
after the colon.

However, it also looks like Eric is trying to do the same action
on a number of lines.  How [shudders] "manual" :)

If you want to place "xx_" in front of each of those items, you
can use something like

        :%s/: */&xx_

Or, if you only want to do it in particular lines that match a
given pattern, you can use

        :g/pattern/s/: */&xx_

So rather than touching each line to edit it, you have vim make a
single pass and do the dirty work for you.

HTH,

-tim


Reply via email to