Closed volgar1x closed 10 years ago
CurPkg, RelPkg and Install commands implemented in b814333a1056
GoTest command implemented in 026060b60f
I'm trying to give completion to GoInstall and GoTest commands. It partially works, here is what I started :
function! GocodeCompletePkg(arg, cmd, index)
let s:base=DirName(@%)
let s:dirs=filter(split(globpath(s:base, a:arg.'*'), '\n'), 'isdirectory(v:val)')
let s:ndirs=len(s:dirs)
if s:ndirs <= 0
return ''
elseif s:ndirs == 1
let s:matched=s:dirs[0]
else
let s:matched=s:dirs[0] " TODO select the next match
endif
return substitute(s:matched, s:base.'/', '', '').'/' " add a trailing / to quickly match a child
endfunction
I would like to select the next match, any help will be nicely accepted :)
where is the go run?
It is not implemented yet.
first,your work is great,thx for your contribution. here,i have a question :if this plugin will auto-install gocode in GOPATH/src/github.com/nsf/gocode. because i don't remember i have installed it there manually. the reason why i chose this plugin is that i can store all this in .vim fold and upload it to github.In this way, i can clone it back easily when i have a new machine. thanks!
It currently does not install automatically nsf/gocode and I do not think that is the plug-in job. You can add, for yourself, in your .vimrc :
system("go install github.com/nsf/gocode")
yeah,thx
I don't think I will create new commands anymore.
Here is somme commands i'd like to implement :