mirror of
https://github.com/golang/go
synced 2024-11-13 15:00:23 -07:00
misc/vim: godoc is optional. so should point installation instruction.
R=golang-dev, r, dsymonds CC=golang-dev https://golang.org/cl/14017043
This commit is contained in:
parent
fa7791e922
commit
b128426804
@ -66,6 +66,13 @@ function! s:GodocView()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:GodocWord(word)
|
function! s:GodocWord(word)
|
||||||
|
if !executable('godoc')
|
||||||
|
echohl WarningMsg
|
||||||
|
echo "godoc command not found."
|
||||||
|
echo " install with: go get code.google.com/p/go.tools/cmd/godoc"
|
||||||
|
echohl None
|
||||||
|
return
|
||||||
|
endif
|
||||||
let word = a:word
|
let word = a:word
|
||||||
silent! let content = system('godoc ' . word)
|
silent! let content = system('godoc ' . word)
|
||||||
if v:shell_error || !len(content)
|
if v:shell_error || !len(content)
|
||||||
|
Loading…
Reference in New Issue
Block a user