Feb
28
The only difference between a bug and a feature is the documentation.
— Anonymous
“My grandfather called me over to his house for a ‘computer emergency’ and gave me these blueprints for success.” — DefaultGen at reddit
Go comes with a syntax file for vim (in misc/vim). I had to tweak ~/.vimrc a bit to make it work nicer. noexpandtab will force vim to insert tabs instead of spaces, smartindent makes the editor keep new lines at the same level of indendation as the previous line.
augroup golang
au!
au BufRead,BufNewFile *.go set filetype=go
au FileType go set noexpandtab
au FileType go set smartindent
au FileType go set equalprg=gofmt
augroup END