mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated vim plugins
This commit is contained in:
@ -74,24 +74,32 @@ function! go#util#env(key) abort
|
||||
return l:var
|
||||
endfunction
|
||||
|
||||
" goarch returns 'go env GOARCH'. This is an internal function and shouldn't
|
||||
" be used. Instead use 'go#util#env("goarch")'
|
||||
function! go#util#goarch() abort
|
||||
return substitute(go#util#System('go env GOARCH'), '\n', '', 'g')
|
||||
endfunction
|
||||
|
||||
" goos returns 'go env GOOS'. This is an internal function and shouldn't
|
||||
" be used. Instead use 'go#util#env("goos")'
|
||||
function! go#util#goos() abort
|
||||
return substitute(go#util#System('go env GOOS'), '\n', '', 'g')
|
||||
endfunction
|
||||
|
||||
" goroot returns 'go env GOROOT'. This is an internal function and shouldn't
|
||||
" be used. Instead use 'go#util#env("goroot")'
|
||||
function! go#util#goroot() abort
|
||||
return substitute(go#util#System('go env GOROOT'), '\n', '', 'g')
|
||||
endfunction
|
||||
|
||||
" gopath returns 'go env GOPATH'. This is an internal function and shouldn't
|
||||
" be used. Instead use 'go#util#env("gopath")'
|
||||
function! go#util#gopath() abort
|
||||
return substitute(go#util#System('go env GOPATH'), '\n', '', 'g')
|
||||
endfunction
|
||||
|
||||
function! go#util#osarch() abort
|
||||
return go#util#goos() . '_' . go#util#goarch()
|
||||
return go#util#env("goos") . '_' . go#util#env("goarch")
|
||||
endfunction
|
||||
|
||||
" System runs a shell command. If possible, it will temporary set
|
||||
|
Reference in New Issue
Block a user