How to pass the word under curor as the para to the command

2015-11-16 Thread imlegendlzz
command! -nargs=1 -bar Pyhelp :call ShowPydoc() nnoremap K :exe ":Pyhelp expand('')" 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('') here

Re: How to pass the word under curor as the para to the command

2015-11-16 Thread Nikolay Pavlov
2015-11-16 15:20 GMT+03:00 : > command! -nargs=1 -bar Pyhelp :call ShowPydoc() > ​You explicitly request here to escape the function arguments by using ``.​ > nnoremap K :exe ":Pyhelp expand('')" > ​so that here actual argument is `"expand('')"` literally. Of course,

Re: How to pass the word under curor as the para to the command

2015-11-16 Thread imlegendlzz
在 2015年11月16日星期一 UTC+8下午8:43:59,ZyX写道: > 2015-11-16 15:20 GMT+03:00 : > command! -nargs=1 -bar Pyhelp :call ShowPydoc() > > > > > ​You explicitly request here to escape the function arguments by using > ``.​ > >   > nnoremap K :exe ":Pyhelp expand('')" > > > > >

Re: How to pass the word under curor as the para to the command

2015-11-16 Thread Charles E Campbell
imlegend...@gmail.com wrote: command! -nargs=1 -bar Pyhelp :call ShowPydoc() nnoremap K :exe ":Pyhelp expand('')" 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