command! -nargs=1 -bar Pyhelp :call ShowPydoc(<f-args>)
nnoremap <buffer> <silent> K :exe ":Pyhelp expand('<cword>')"

I define a ShowPydoc func, 

If you type ":Pyhelp xxx"

you will get the help of xxx.

Now I want to map the K to the that if I move the curor on the word that I want 
to get the helpdoc.

But expand('<cword>') here can't get the word under curor and pass the 
"expand(<'cword'>)" to the func. 

And I try :echo expand(<'cword'>) it worked,

How can I fix it?

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to