This change adds a basic compiler plugin for Go. The plugin
integrates "go build" with Vim's ":make" command and the
quickfix list.
Fixes #5751.
R=golang-dev, dsymonds, niklas.schnelle, 0xjnml
CC=golang-dev
https://golang.org/cl/
10466043
--- /dev/null
+" 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
If you want to select fewer plugins, use the instructions in the rest of
this file.
+
Vim syntax highlighting
-----------------------
filetype indent on
+Vim compiler plugin
+-------------------
+
+To install the compiler plugin:
+
+ 1. Same as 1 above.
+ 2. Copy or link compiler/go.vim to the compiler directory underneath your vim
+ runtime directory (normally $HOME/.vim/compiler).
+ 3. Activate the compiler plugin with ":compiler go". To always enable the
+ compiler plugin in Go source files add an autocommand to your .vimrc file
+ (normally $HOME/.vimrc):
+
+ autocmd FileType go compiler go
+
+
Godoc plugin
------------