Provide :Javadoc

In support of #15.
This commit is contained in:
Tim Pope 2012-12-14 18:39:15 -05:00
parent 693de7cf45
commit 56cd47c52e
2 changed files with 5 additions and 1 deletions

View File

@ -48,6 +48,9 @@ DOCUMENTATION *foreplay-documentation*
*foreplay-:Doc* *foreplay-:Doc*
:Doc {symbol} Show the docs for the given symbol. :Doc {symbol} Show the docs for the given symbol.
*foreplay-:Javadoc*
:Javadoc {class} Open the java docs for the given class in a browser.
*foreplay-K* *foreplay-K*
K Look up docs for keyword under cursor. K Look up docs for keyword under cursor.

View File

@ -835,8 +835,9 @@ augroup foreplay_doc
autocmd FileType clojure nnoremap <buffer> K :Doc <C-R><C-W><CR> autocmd FileType clojure nnoremap <buffer> K :Doc <C-R><C-W><CR>
autocmd FileType clojure nnoremap <buffer> [d :Source <C-R><C-W><CR> autocmd FileType clojure nnoremap <buffer> [d :Source <C-R><C-W><CR>
autocmd FileType clojure nnoremap <buffer> ]d :Source <C-R><C-W><CR> autocmd FileType clojure nnoremap <buffer> ]d :Source <C-R><C-W><CR>
autocmd FileType clojure command! -buffer -nargs=1 FindDoc :exe s:Lookup('find-doc', printf('#"%s"', <q-args>))
autocmd FileType clojure command! -buffer -nargs=1 Apropos :exe s:Apropos(<q-args>) autocmd FileType clojure command! -buffer -nargs=1 Apropos :exe s:Apropos(<q-args>)
autocmd FileType clojure command! -buffer -nargs=1 FindDoc :exe s:Lookup('find-doc', printf('#"%s"', <q-args>))
autocmd FileType clojure command! -buffer -bar -nargs=1 Javadoc :exe s:Lookup('javadoc', <q-args>)
autocmd FileType clojure command! -buffer -bar -nargs=1 -complete=customlist,foreplay#eval_complete Doc :exe s:Lookup('doc', <q-args>) autocmd FileType clojure command! -buffer -bar -nargs=1 -complete=customlist,foreplay#eval_complete Doc :exe s:Lookup('doc', <q-args>)
autocmd FileType clojure command! -buffer -bar -nargs=1 -complete=customlist,foreplay#eval_complete Source :exe s:Lookup('source', <q-args>) autocmd FileType clojure command! -buffer -bar -nargs=1 -complete=customlist,foreplay#eval_complete Source :exe s:Lookup('source', <q-args>)
augroup END augroup END