Skip to content

Instantly share code, notes, and snippets.

@dmmcquay
Created February 19, 2016 21:33
Show Gist options
  • Save dmmcquay/69ed23295b343eda29cf to your computer and use it in GitHub Desktop.
Save dmmcquay/69ed23295b343eda29cf to your computer and use it in GitHub Desktop.
set nocompatible
set encoding=utf-8
set showcmd
set tabstop=4
set shiftwidth=4
set expandtab
set number
set hlsearch
set incsearch
set ignorecase
set smartcase
nnoremap ; :
nnoremap <c-n> :bnext<cr>
nnoremap <c-p> :bprev<cr>
"undo awesomeness:
nnoremap <F5> :GundoToggle<CR>
set undofile
set undodir=~/.vim/undo
set undolevels=10000
set undoreload=100000
filetype on
filetype plugin on
filetype indent on
syntax on
call pathogen#infect()
"set rtp+=~/src/code.google.com/p/go/misc/vim
syntax enable
set background=dark
set t_Co=256
let g:solarized_termcolors=256
colorscheme solarized
let mapleader = ","
autocmd FileType python map <leader>pep :call Flake8()<cr>
nnoremap <leader>ws :%s/\s\+$//e<CR>
nnoremap <leader><space> :nohlsearch<cr>
" one-keystroke window moves:
nnoremap <c-j> <c-w>j
nnoremap <c-k> <c-w>k
nnoremap <c-h> <c-w>h
nnoremap <c-l> <c-w>l
nnoremap <c-n> :bnext<cr>
nnoremap <c-p> :bprev<cr>
" for those moments when you want to act like you have a soul
set colorcolumn=80
" go-specific stuff
" - for go-vim
au FileType go nmap <leader>gd <Plug>(go-doc)
au FileType go nmap <leader>t <Plug>(go-test)
"au FileType go nmap <Plug>(go-def)
let g:go_fmt_command = "goimports"
" - just stuff i like:
au FileType go setl noet ts=4 tw=0 makeprg=go\ install\ -v\ ./...
au FileType go noremap <leader>test :!go test -v ./...<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment