Skip to content

Instantly share code, notes, and snippets.

@fatih
Created March 27, 2014 11:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fatih/9805043 to your computer and use it in GitHub Desktop.
Save fatih/9805043 to your computer and use it in GitHub Desktop.
"this produces an output like:
" /path/file1.txt
" /path/file2.txt
" /path/file3.txt
function! GoFiles()
let out=system("go list -f $'{{range $f := .GoFiles}}{{$.Dir}}/{{$f}}\n{{end}}'")
echo out
endfunction
" I need to append the files above to this command:
CompilerSet makeprg=go\ build\ -o\ /dev/null\
" like:
CompilerSet makeprg=go\ build\ -o\ /dev/null\ /path/file1.txt /path/file2.txt /path/file3.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment