1
0
mirror of https://github.com/amix/vimrc synced 2025-06-16 01:25:00 +08:00

Updated vim plugins

This commit is contained in:
amix
2016-08-20 13:23:52 +02:00
parent 61a22e9f3e
commit f8d1d3bb50
27 changed files with 264 additions and 208 deletions

View File

@ -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)