Le vendredi 27 mars 2015 à 10:13, Егор a écrit:
> Perlusers has perldoc and some vim plugins, like perlsupport, allows to view
> reference about perl keyword in new split. Is there a way to do something
> like this for javascript?
This might not help you much, but anyway. I have this for R (here in
simplified form):
    " This is in ftplugin/r.vim.
    function! s:RHelp (f)
      " Split screen.
      silent split R\ Help
      " Call to the 'R' command to display help; a bit of string
      " manipulation is actually performed on the result, to remove
      " formatting of the R help.
      exe "0read !R --slave -e '?" . a:f . "'"
      " Not necessary, but I have additional things in
      " ftplugin/rhelp.vim.
      set ft=rhelp
      " Set the cursor at the beginning of the file.
      call cursor(1, 1)
    endfunction
    " I now use ':Rhelp keyword'.
    com! -buffer -nargs=1 Rhelp call s:RHelp(<q-args>)
This shouldn't be too hard to adapt to JS if you can find a reference
in appropriate form. On that point, I don't know if there exists a JS
doc readable in a terminal.
Best,
Paul
-- 
-- 
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 vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment