mirror of https://github.com/golang/go.git
misc/vim: fix reimport guard and remove K mapping.
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
This commit is contained in:
parent
63c6b3c482
commit
c8fe9c7606
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue