Skip to content

Instantly share code, notes, and snippets.

@bencates
Created July 23, 2015 22:07
Show Gist options
  • Save bencates/e0c276842cf5cdca1b4e to your computer and use it in GitHub Desktop.
Save bencates/e0c276842cf5cdca1b4e to your computer and use it in GitHub Desktop.
vimrc
" Use Vim extensions; must be first thing in file
set nocompatible
" Use a POSIX compliant shell
set shell=/bin/bash
" BEGIN Vundle setup
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
" Plugins
Plugin 'kien/ctrlp.vim'
Plugin 'ddollar/nerdcommenter'
Plugin 'scrooloose/nerdtree'
Plugin 'godlygeek/tabular'
Plugin 'drmikehenry/vim-fontsize'
Plugin 'airblade/vim-gitgutter'
Plugin 'tpope/vim-surround'
Plugin 'bronson/vim-trailing-whitespace'
Plugin 'Valloric/YouCompleteMe' " https://github.com/Valloric/YouCompleteMe#installation
" Languages and Frameworks
Plugin 'tpope/vim-rails' " Ruby/Rails
Plugin 'spf13/PIV' " PHP
Plugin 'fatih/vim-go' " Go
Plugin 'evidens/vim-twig' " Twig
" Themes
Plugin 'altercation/vim-colors-solarized'
call vundle#end()
filetype plugin indent on
" END Vundle setup
" Sane window change shortcuts
nnoremap <c-h> <c-w>h
nnoremap <c-j> <c-w>j
nnoremap <c-k> <c-w>k
nnoremap <c-l> <c-w>l
" Relative numbering
set relativenumber
" Highlight the right column
execute "set colorcolumn=" . join(range(81,512), ',')
" Shortcut to clear highlighting
nnoremap <leader>x noh
" Space for code folding
nnoremap <space> za
vnoremap <space> zf
" 2-space tabs
set shiftwidth=2 tabstop=2 softtabstop=2 smarttab expandtab
" NERDTree
nnoremap <leader>n :NERDTreeToggle<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment