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

@ -26,7 +26,7 @@ function! go#tool#Imports()
let command = "go list -f $'{{range $f := .Imports}}{{$f}}\n{{end}}'"
endif
let out = go#tool#ExecuteInDir(command)
if v:shell_error
if go#util#ShellError() != 0
echo out
return imports
endif
@ -51,7 +51,7 @@ function! go#tool#ParseErrors(lines)
call add(errors, {"text": fatalerrors[1]})
elseif !empty(tokens)
" strip endlines of form ^M
let out=substitute(tokens[3], '\r$', '', '')
let out = substitute(tokens[3], '\r$', '', '')
call add(errors, {
\ "filename" : fnamemodify(tokens[1], ':p'),
@ -114,7 +114,7 @@ function! go#tool#ExecuteInDir(cmd) abort
let dir = getcwd()
try
execute cd . fnameescape(expand("%:p:h"))
let out = system(a:cmd)
let out = go#util#System(a:cmd)
finally
execute cd . fnameescape(dir)
endtry
@ -129,7 +129,7 @@ function! go#tool#Exists(importpath)
let command = "go list ". a:importpath
let out = go#tool#ExecuteInDir(command)
if v:shell_error
if go#util#ShellError() != 0
return -1
endif
@ -144,7 +144,7 @@ function! s:get_browser_command()
if go_play_browser_command == ''
if go#util#IsWin()
let go_play_browser_command = '!start rundll32 url.dll,FileProtocolHandler %URL%'
elseif has('mac') || has('macunix') || has('gui_macvim') || system('uname') =~? '^darwin'
elseif has('mac') || has('macunix') || has('gui_macvim') || go#util#System('uname') =~? '^darwin'
let go_play_browser_command = 'open %URL%'
elseif executable('xdg-open')
let go_play_browser_command = 'xdg-open %URL%'
@ -175,7 +175,7 @@ function! go#tool#OpenBrowser(url)
exec cmd
else
let cmd = substitute(cmd, '%URL%', '\=shellescape(a:url)', 'g')
call system(cmd)
call go#util#System(cmd)
endif
endfunction