mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins, also experimenting with a new font
The font is IBM Plex Mono: https://ibm.github.io/type/
This commit is contained in:
@ -80,6 +80,7 @@ function! go#package#FromPath(arg) abort
|
||||
for dir in dirs
|
||||
if len(dir) && match(path, dir) == 0
|
||||
let workspace = dir
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
|
||||
@ -87,10 +88,12 @@ function! go#package#FromPath(arg) abort
|
||||
return -1
|
||||
endif
|
||||
|
||||
let path = substitute(path, '/*$', '', '')
|
||||
let workspace = substitute(workspace . '/src/', '/+', '', '')
|
||||
if isdirectory(path)
|
||||
return substitute(path, workspace . 'src/', '', '')
|
||||
return substitute(path, workspace, '', '')
|
||||
else
|
||||
return substitute(substitute(path, workspace . 'src/', '', ''),
|
||||
return substitute(substitute(path, workspace, '', ''),
|
||||
\ '/' . fnamemodify(path, ':t'), '', '')
|
||||
endif
|
||||
endfunction
|
||||
|
Reference in New Issue
Block a user