mirror of
https://github.com/amix/vimrc
synced 2025-06-16 09:35:01 +08:00
Updated vim plugins
This commit is contained in:
@ -4,6 +4,10 @@ if exists("g:go_loaded_install")
|
||||
endif
|
||||
let g:go_loaded_install = 1
|
||||
|
||||
" don't spam the user when Vim is started in Vi compatibility mode
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! s:checkVersion() abort
|
||||
" Not using the has('patch-7.4.2009') syntax because that wasn't added until
|
||||
" 7.4.237, and we want to be sure this works for everyone (this is also why
|
||||
@ -171,7 +175,7 @@ function! s:GoInstallBinaries(updateBinaries, ...)
|
||||
|
||||
" and then build and install it
|
||||
let l:build_cmd = ['go', 'build', '-o', go_bin_path . go#util#PathSep() . bin, l:importPath]
|
||||
let [l:out, l:err] = go#util#Exec(l:build_cmd + [l:importPath])
|
||||
let [l:out, l:err] = go#util#Exec(l:build_cmd)
|
||||
if l:err
|
||||
echom "Error installing " . l:importPath . ": " . l:out
|
||||
endif
|
||||
@ -267,7 +271,7 @@ endfunction
|
||||
function! s:metalinter_autosave()
|
||||
" run gometalinter on save
|
||||
if get(g:, "go_metalinter_autosave", 0)
|
||||
call go#lint#Gometa(1)
|
||||
call go#lint#Gometa(0, 1)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
@ -314,4 +318,8 @@ augroup vim-go
|
||||
\| endif
|
||||
augroup end
|
||||
|
||||
" restore Vi compatibility settings
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: sw=2 ts=2 et
|
||||
|
Reference in New Issue
Block a user