1
0
mirror of https://github.com/golang/go synced 2024-11-23 05:30:07 -07:00

misc/vim: complete packages in src directory

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/14454059
This commit is contained in:
Yasuhiro Matsumoto 2013-10-11 11:30:03 +11:00 committed by David Symonds
parent beca0e124d
commit 5516349fe7

View File

@ -86,6 +86,7 @@ function! go#complete#Package(ArgLead, CmdLine, CursorPos)
for dir in dirs
" this may expand to multiple lines
let root = split(expand(dir . '/pkg/' . s:goos . '_' . s:goarch), "\n")
call add(root, expand(dir . '/src'))
for r in root
for i in split(globpath(r, a:ArgLead.'*'), "\n")
if isdirectory(i)