On Tuesday 04 July 2006 08:58, Jürgen Krämer wrote:
> a function already takes care of not changing the last used search
> pattern and the redo command, so
> 
>   function! U()
>       /\u\|\W
>   endfunction
> 
>   :onoremap u :call U()<cr>
> 
> should be enough.

In fact it will only work correctly with normal, as in>

function! UpperOrWord()
    normal /\u\|\W^M
endfunction

:onoremap u :call UpperOrWord()<cr>

Note: the ^M is entered by ctrl-v ctrl-m

I prefer to have a speaking names for functions, hence the change in
functionname here.


HTH, Michael

Reply via email to