On Wed, August 10, 2011 10:39 am, sinbad wrote:
> why doesn't the "/ register filled with the current search.
> with the following mapping. should i do something special
>
> nmap \jj :call Jj()

That should be nnoremap \jj :call Jj()<CR>

> fun! Jj()
> let someflag=1

Why are you setting this flag, but don't use it?

> silent normal! *

Possibly make this :sil! norm! *

> endfun

So in short, write you mapping like this:
:nnoremap \jj :sil! norm! *<cr>

But I don't know what you mean with the / register doesn't get filled.
If I execute your mapping by typing \jj in normal mode and then :echo @/
Vim correctly returns the search term with '\<' and '\>' wrapped around it.

regards,
Christian

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to