]> Cypherpunks repositories - gostls13.git/commitdiff
misc/vim: fix reimport guard and remove K mapping.
authorAndrew Radev <andrey.radev@gmail.com>
Mon, 29 Oct 2012 11:10:59 +0000 (22:10 +1100)
committerDavid Symonds <dsymonds@golang.org>
Mon, 29 Oct 2012 11:10:59 +0000 (22:10 +1100)
The "did_ftplugin" lines were ineffective and the "K" mapping was too
invasive, which is why it was removed.

R=golang-dev, dsymonds, minux.ma
CC=golang-dev
https://golang.org/cl/6823044

misc/vim/ftplugin/go/fmt.vim
misc/vim/ftplugin/go/godoc.vim [deleted file]
misc/vim/ftplugin/go/import.vim
misc/vim/readme.txt

index 0ee44cd59ef8e1c448e9ad19252833548c08a899..30814fdfdabdb23c47ece33c02b7e5475ad8ace8 100644 (file)
@@ -12,6 +12,9 @@
 "       It tries to preserve cursor position and avoids
 "       replacing the buffer with stderr output.
 "
+if exists("b:did_ftplugin_go_fmt")
+    finish
+endif
 
 command! -buffer Fmt call s:GoFormat()
 
@@ -41,4 +44,6 @@ function! s:GoFormat()
     call winrestview(view)
 endfunction
 
+let b:did_ftplugin_go_fmt = 1
+
 " vim:ts=4:sw=4:et
diff --git a/misc/vim/ftplugin/go/godoc.vim b/misc/vim/ftplugin/go/godoc.vim
deleted file mode 100644 (file)
index 55195a6..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-" Copyright 2011 The Go Authors. All rights reserved.
-" Use of this source code is governed by a BSD-style
-" license that can be found in the LICENSE file.
-"
-" godoc.vim: Vim command to see godoc.
-
-if exists("b:did_ftplugin")
-    finish
-endif
-
-silent! nmap <buffer> <silent> K <Plug>(godoc-keyword)
-
-" vim:ts=4:sw=4:et
index 8cf89291e5bd40c6abdeba2e79150c1c28364973..1d969e4602b863a87ec4769b3f009f35da9f8a94 100644 (file)
@@ -32,7 +32,7 @@
 " The backslash is the default maplocalleader, so it is possible that
 " your vim is set to use a different character (:help maplocalleader).
 "
-if exists("b:did_ftplugin")
+if exists("b:did_ftplugin_go_import")
     finish
 endif
 
@@ -228,4 +228,6 @@ function! s:Error(s)
     echohl Error | echo a:s | echohl None
 endfunction
 
+let b:did_ftplugin_go_import = 1
+
 " vim:ts=4:sw=4:et
index fe15da9935692d6d3b9649447c9c5c95ba2eacfb..1e0aa4883d96887303e04781e0abc451b4f594f8 100644 (file)
@@ -72,5 +72,4 @@ To install godoc plugin:
   1. Same as 1 above.
   2. Copy or link plugin/godoc.vim to $HOME/.vim/plugin/godoc,
      syntax/godoc.vim to $HOME/.vim/syntax/godoc.vim,
-     ftplugin/go/godoc.vim to $HOME/.vim/ftplugin/go/godoc.vim.
      and autoload/go/complete.vim to $HOME/.vim/autoload/go/complete.vim.