From: Yasuhiro Matsumoto Date: Fri, 27 Sep 2013 02:35:03 +0000 (+1000) Subject: misc/vim: godoc is optional. so should point installation instruction. X-Git-Tag: go1.2rc2~109 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b128426804cc3b6f4243eab2651f6ad79519e5b1;p=gostls13.git misc/vim: godoc is optional. so should point installation instruction. R=golang-dev, r, dsymonds CC=golang-dev https://golang.org/cl/14017043 --- diff --git a/misc/vim/plugin/godoc.vim b/misc/vim/plugin/godoc.vim index 47ba9e08f0..33c9ec05bf 100644 --- a/misc/vim/plugin/godoc.vim +++ b/misc/vim/plugin/godoc.vim @@ -66,6 +66,13 @@ function! s:GodocView() endfunction 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 silent! let content = system('godoc ' . word) if v:shell_error || !len(content)