Skip to content

Commit

Permalink
.vimrc added augroup golang
Browse files Browse the repository at this point in the history
  • Loading branch information
fb929 committed Nov 17, 2023
1 parent fa2e285 commit 11c1087
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,18 @@ augroup tf
autocmd BufRead,BufNewFile *.tf set smartindent
autocmd BufNewFile,BufRead *.tf let b:mtrailingws=matchadd('ErrorMsg', '\s\+$', -1)
augroup END
augroup golang
autocmd!
autocmd BufRead,BufNewFile *.go match none
autocmd BufRead,BufNewFile *.go set shiftwidth=4
autocmd BufRead,BufNewFile *.go set tabstop=4
autocmd BufRead,BufNewFile *.go set smarttab
autocmd BufRead,BufNewFile *.go set noexpandtab
autocmd BufRead,BufNewFile *.go set autoindent
autocmd BufRead,BufNewFile *.go set smartindent
autocmd BufNewFile,BufRead *.go let b:mtrailingws=matchadd('ErrorMsg', 's\+$', -1)
autocmd BufNewFile,BufRead *.go let b:mtrailingws=matchadd('ErrorMsg', '/\s\+$\| \+\ze\t\|^\t*\zs \+/', -1)
augroup END

" fix term in screen
if match($TERM, "screen")!=-1
Expand Down

0 comments on commit 11c1087

Please sign in to comment.