]> Cypherpunks repositories - gostls13.git/commitdiff
misc/vim: godoc is optional. so should point installation instruction.
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Fri, 27 Sep 2013 02:35:03 +0000 (12:35 +1000)
committerDavid Symonds <dsymonds@golang.org>
Fri, 27 Sep 2013 02:35:03 +0000 (12:35 +1000)
R=golang-dev, r, dsymonds
CC=golang-dev
https://golang.org/cl/14017043

misc/vim/plugin/godoc.vim

index 47ba9e08f08a01affc8ad82b01c48a5f87e88bf6..33c9ec05bf06407b08f3d446c0529e4164f2a07a 100644 (file)
@@ -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)