summaryrefslogtreecommitdiff
path: root/misc/vim/compiler/go.vim
diff options
context:
space:
mode:
Diffstat (limited to 'misc/vim/compiler/go.vim')
-rw-r--r--misc/vim/compiler/go.vim30
1 files changed, 30 insertions, 0 deletions
diff --git a/misc/vim/compiler/go.vim b/misc/vim/compiler/go.vim
new file mode 100644
index 000000000..2c8cce497
--- /dev/null
+++ b/misc/vim/compiler/go.vim
@@ -0,0 +1,30 @@
+" 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
+
+CompilerSet makeprg=go\ build
+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