mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated vim plugins
This commit is contained in:
@ -59,7 +59,7 @@ function! go#package#ImportPath(arg)
|
||||
let dirs = go#package#Paths()
|
||||
|
||||
for dir in dirs
|
||||
if len(dir) && match(path, dir) == 0
|
||||
if len(dir) && matchstr(escape(path, '\/'), escape(dir, '\/')) == 0
|
||||
let workspace = dir
|
||||
endif
|
||||
endfor
|
||||
@ -68,8 +68,13 @@ function! go#package#ImportPath(arg)
|
||||
return -1
|
||||
endif
|
||||
|
||||
let srcdir = substitute(workspace . '/src/', '//', '/', '')
|
||||
return substitute(path, srcdir, '', '')
|
||||
if go#util#IsWin()
|
||||
let srcdir = substitute(workspace . '\src\', '//', '/', '')
|
||||
return path[len(srcdir):]
|
||||
else
|
||||
let srcdir = substitute(workspace . '/src/', '//', '/', '')
|
||||
return substitute(path, srcdir, '', '')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! go#package#FromPath(arg)
|
||||
|
Reference in New Issue
Block a user