I made a mapping that does g//p for the current word
      nmap <f2> :exe 'g/\<'.expand('<cword>') . '\>/#'<cr>
This works, but I want it to restore the original position:
      nmap <f2> ms:exe 'g/\<'.expand('<cword>') . '\>/#'<cr>'s
This does not work, because 's clears the output. It is sort of
executed, but the output is not seen because the 's clears it.
How do I make the rhs of the mapping to wait for my input,
then to execute 's ?

Thanks
Yakov

Reply via email to