Skip to content

Commit

Permalink
Improve Build, now it doesn't produce any binary, closes #9
Browse files Browse the repository at this point in the history
  • Loading branch information
fatih committed Mar 27, 2014
1 parent aa2f7e9 commit ffb6275
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion compiler/go.vim
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ endif
let s:save_cpo = &cpo
set cpo-=C

CompilerSet makeprg=go\ build
" Does not produce any output binary, which is we want
let golang_makeprg = 'go\ build\ -o\ /dev/null\ ' . join(split(GoFiles(), '\n'), '\ ')
exec ':CompilerSet makeprg=' . golang_makeprg
CompilerSet errorformat=
\%-G#\ %.%#,
\%A%f:%l:%c:\ %m,
Expand Down
8 changes: 4 additions & 4 deletions plugin/godeps.vim
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ let g:go_loaded_godeps = 1

function! GoFiles()
let out=system("go list -f $'{{range $f := .GoFiles}}{{$.Dir}}/{{$f}}\n{{end}}'")
echo out
return out
endfunction

function! GoDeps()
let out=system("go list -f $'{{range $f := .Deps}}{{$f}}\n{{end}}'")
echo out
return out
endfunction

command! Gofiles :call GoFiles()
command! Godeps :call GoDeps()
command! Gofiles echo GoFiles()
command! Godeps echo GoDeps()

0 comments on commit ffb6275

Please sign in to comment.