Skip to content

Commit

Permalink
missed some
Browse files Browse the repository at this point in the history
  • Loading branch information
dropwhile committed Sep 25, 2014
1 parent f0104eb commit f27600f
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
30 changes: 30 additions & 0 deletions dotfiles/vim/compiler/go.vim
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions dotfiles/vim/ftplugin/go.vim
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit f27600f

Please sign in to comment.