On Fri 8-Dec-06 11:43am -0600, you wrote:
> From: Bill McCarthy
>> On Thu 7-Dec-06 11:33pm -0600, Chuck Mason wrote:

>>> Does anyone know of a shorter, happier way to perform (in normal mode)
>>>
>>> Pdwbyw
>>>  
>>> That is, replace the current word with whats in "0 but leave "0 alone?

>>     diw"0P

> Neat. Thank you very much for the help! This works 90% of what I want so
> maybe you can help with the last 10%? I made a mapping

> :nmap \rw dip"0P

> And \rw now replaces my words as I want.  However, using . (repeat) only
> repeats the "0P part.  Anyway I can have it repeat the whole command?

I thought it might work with something like this:

    nmap \rw :exe 'norm diw"0P'<CR>

It doesn't - only the final '"0P' is executed by '.' and
using '@:' repeats the last command I actually typed (not
the one "typed" by the map).

If you are going to repeat so many that typing \rw becomes a
burden, you could do:

    nm . \rw

Do all your changes and then type

    nun .

As the help file notes:

    :nunmap can also be used outside of a monastery.

:helpg monastery

-- 
Best regards,
Bill

Reply via email to