1
0
mirror of https://github.com/amix/vimrc synced 2025-07-10 11:44:59 +08:00

updated plugins and added eslint goodies

This commit is contained in:
Max Alcala
2016-02-19 10:35:36 -06:00
parent a1deb28314
commit f3143286d3
402 changed files with 14389 additions and 4024 deletions

View File

@ -31,17 +31,19 @@ endif
function! go#package#Paths()
let dirs = []
if executable('go')
let goroot = substitute(system('go env GOROOT'), '\n', '', 'g')
if v:shell_error
echomsg '''go env GOROOT'' failed'
if !exists("s:goroot")
if executable('go')
let s:goroot = substitute(system('go env GOROOT'), '\n', '', 'g')
if v:shell_error
echomsg '''go env GOROOT'' failed'
endif
else
let s:goroot = $GOROOT
endif
else
let goroot = $GOROOT
endif
if len(goroot) != 0 && isdirectory(goroot)
let dirs += [goroot]
if len(s:goroot) != 0 && isdirectory(s:goroot)
let dirs += [s:goroot]
endif
let workspaces = split($GOPATH, go#util#PathListSep())
@ -66,7 +68,8 @@ function! go#package#ImportPath(arg)
return -1
endif
return substitute(path, workspace . '/src/', '', '')
let srcdir = substitute(workspace . '/src/', '//', '/', '')
return substitute(path, srcdir, '', '')
endfunction
function! go#package#FromPath(arg)