From f27600f69d2b841ddb75eb8cae619d7fc43d6b71 Mon Sep 17 00:00:00 2001 From: elij Date: Thu, 25 Sep 2014 01:51:28 -0700 Subject: [PATCH] missed some --- dotfiles/vim/compiler/go.vim | 30 ++++++++++++++++++++++++++++++ dotfiles/vim/ftplugin/go.vim | 19 +++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 dotfiles/vim/compiler/go.vim create mode 100644 dotfiles/vim/ftplugin/go.vim diff --git a/dotfiles/vim/compiler/go.vim b/dotfiles/vim/compiler/go.vim new file mode 100644 index 0000000..2c8cce4 --- /dev/null +++ b/dotfiles/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 +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 diff --git a/dotfiles/vim/ftplugin/go.vim b/dotfiles/vim/ftplugin/go.vim new file mode 100644 index 0000000..532fb17 --- /dev/null +++ b/dotfiles/vim/ftplugin/go.vim @@ -0,0 +1,19 @@ +" 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. +" +" go.vim: Vim filetype plugin for Go. + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +setlocal formatoptions-=t + +setlocal comments=s1:/*,mb:*,ex:*/,:// +setlocal commentstring=//\ %s + +let b:undo_ftplugin = "setl fo< com< cms<" + +" vim:ts=4:sw=4:et