1
0
mirror of https://github.com/amix/vimrc synced 2025-06-16 01:25:00 +08:00

Updated plugins

This commit is contained in:
amix
2016-05-14 12:57:54 +01:00
parent 5f6aa8fe09
commit f343b66088
105 changed files with 2100 additions and 4902 deletions

View File

@ -4,15 +4,13 @@ if exists("g:go_loaded_install")
endif
let g:go_loaded_install = 1
" these packages are used by vim-go and can be automatically installed if
" needed by the user with GoInstallBinaries
let s:packages = [
\ "github.com/nsf/gocode",
\ "github.com/alecthomas/gometalinter",
\ "golang.org/x/tools/cmd/goimports",
\ "github.com/rogpeppe/godef",
\ "golang.org/x/tools/cmd/oracle",
\ "golang.org/x/tools/cmd/guru",
\ "golang.org/x/tools/cmd/gorename",
\ "github.com/golang/lint/golint",
\ "github.com/kisielk/errcheck",
@ -20,6 +18,7 @@ let s:packages = [
\ "github.com/klauspost/asmfmt/cmd/asmfmt",
\ "github.com/fatih/motion",
\ "github.com/zmb3/gogetdoc",
\ "github.com/josharian/impl",
\ ]
" These commands are available on any filetypes
@ -54,7 +53,7 @@ function! s:GoInstallBinaries(updateBinaries)
let old_path = $PATH
" vim's executable path is looking in PATH so add our go_bin path to it
let $PATH = $PATH . go#util#PathListSep() .go_bin_path
let $PATH = go_bin_path . go#util#PathListSep() . $PATH
" when shellslash is set on MS-* systems, shellescape puts single quotes
" around the output string. cmd on Windows does not handle single quotes
@ -68,7 +67,7 @@ function! s:GoInstallBinaries(updateBinaries)
let cmd = "go get -u -v "
let s:go_version = matchstr(system("go version"), '\d.\d.\d')
let s:go_version = matchstr(go#util#System("go version"), '\d.\d.\d')
" https://github.com/golang/go/issues/10791
if s:go_version > "1.4.0" && s:go_version < "1.5.0"
@ -92,8 +91,8 @@ function! s:GoInstallBinaries(updateBinaries)
endif
let out = system(cmd . shellescape(pkg))
if v:shell_error
let out = go#util#System(cmd . shellescape(pkg))
if go#util#ShellError() != 0
echo "Error installing ". pkg . ": " . out
endif
endif
@ -168,10 +167,6 @@ augroup vim-go
if get(g:, "go_metalinter_autosave", 0)
autocmd BufWritePost *.go call go#lint#Gometa(1)
endif
" initialize window-local godef stack
au BufReadPre,WinEnter *.go if !exists('w:go_stack') | let w:go_stack = [] | endif
au BufReadPre,WinEnter *.go if !exists('w:go_stack_level') | let w:go_stack_level = 0 | endif
augroup END