Created
March 28, 2014 14:40
-
-
Save fatih/9834395 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Copyright 2013 The Go Authors. All rights reserved. | |
" Use of this source code is governed by a BSD-style | |
" license that can be found in the LICENSE file. | |
" | |
" compiler/go.vim: Vim compiler file for Go. | |
if exists("current_compiler") | |
finish | |
endif | |
let current_compiler = "go" | |
if exists(":CompilerSet") != 2 | |
command -nargs=* CompilerSet setlocal <args> | |
endif | |
let s:save_cpo = &cpo | |
set cpo-=C | |
" 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, | |
\%A%f:%l:\ %m, | |
\%C%*\\s%m, | |
\%-G%.%# | |
let &cpo = s:save_cpo | |
unlet s:save_cpo | |
" vim:ts=4:sw=4:et |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment