Skip to content

Instantly share code, notes, and snippets.

@husobee
Last active December 25, 2021 00:40
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save husobee/8d6ae09f79f4e584c8a2 to your computer and use it in GitHub Desktop.
Save husobee/8d6ae09f79f4e584c8a2 to your computer and use it in GitHub Desktop.
my vimrc
" My .vimrc, it is pretty golang specific
colorscheme elflord
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
set rtp+=$GOROOT/misc/vim
" vundle plugins
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'fatih/vim-go'
Plugin 'nsf/gocode', {'rtp': 'vim/'}
Plugin 'Syntastic'
Plugin 'Valloric/YouCompleteMe'
Plugin 'godlygeek/tabular'
call vundle#end()
" ident by filename
filetype plugin indent on
" show syntax
syntax on
" expand tabs, 4 spaces
set expandtab
set tabstop=4
set shiftwidth=4
set et
set sw=4
set softtabstop=4
set tabstop=4
set smarttab
set smartindent
set autoindent
" set line numbers
set number
set ignorecase
set smartcase
" turn off error bells
set noerrorbells
set t_vb=
" show tabs as ....>
set list listchars=tab:>-,trail:.,extends:>
set errorformat=%m\ in\ %f\ on\ line\ %l
set comments=s1:/**,mb:*,ex:*/
" YCM broke backspace in the past
set backspace=indent,eol,start
" use goimports.. go get goimports for this to work
let g:go_fmt_command = "goimports"
" fmt golang files on the way out
au FileType go au BufWritePre <buffer> Fmt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment