Hi Yakov Lerner wrote: > > On 7/3/06, Giorgos Gaganis <[EMAIL PROTECTED]> wrote: > > > > Although it does the job there is a really annoying side-effect. Because > > it uses a search all uppercase and nonword chars are highlighted which > > makes the screen practically unreadable. > > Preserving search pattern will resolve the > side-effect you mention. The following works for me: > > function! U() > let x=@/ > /\u\|\W > let @/=x > endfun > > :onoremap u :call U()<cr>
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. Regards, Jürgen -- Jürgen Krämer Softwareentwicklung HABEL GmbH & Co. KG mailto:[EMAIL PROTECTED] Hinteres Öschle 2 Tel: +49 / 74 61 / 93 53 - 15 78604 Rietheim-Weilheim Fax: +49 / 74 61 / 93 53 - 99