Skip to content

Instantly share code, notes, and snippets.

@usirin
Created February 24, 2014 04:43
Show Gist options
  • Select an option

  • Save usirin/9182075 to your computer and use it in GitHub Desktop.

Select an option

Save usirin/9182075 to your computer and use it in GitHub Desktop.
set rtp+=$HOME/.vim/bundle/vundle
call vundle#rc()
Bundle 'gmarik/vundle'
""""""""""""""""""
"" LOW LEVEL SETUP
""""""""""""""""""
filetype on
filetype indent on
filetype plugin on
syntax on
let mapleader=","
let &t_Co=256
" Loads vimrc after every save
" au BufWritePost .vimrc so ~/.vimrc
"""""""""""""""""""
"" HIGH LEVEL SETUP
"""""""""""""""""""
set nocompatible
set ignorecase
set hlsearch
set autoindent
set fileencoding=utf-8
set encoding=utf-8
set backspace=indent,eol,start
set nofoldenable " disable folding
set expandtab
set tabstop=2
set shiftwidth=2
set list listchars=tab:\ \ ,trail:· " highlight tailing whitespace
" use system clipboard
" http://stackoverflow.com/questions/8134647/copy-and-paste-in-vim-via-keyboard-between-different-mac-terminals
set clipboard+=unnamed
" set status bar to be shown all the time
" and format it
set laststatus=2
set statusline=%f\ %=L:%l/%L\ %c\ (%p%%)
set smartcase
set gdefault
set incsearch
set showmatch
set number
" autoload files that have changed outside of vim
set autoread
" Make handling Vim windows easier
map <leader>w- <c-w>- " smaller
map <leader>w+ <c-w>+ " larger
map <leader>w[ <c-w>= " equal
map <leader>w] <c-w>_ " fill screen
map <leader>> <c-w>> " vertical expand
map <leader>< <c-w>< " vertical smaller
" make splitting vim windows easier
map <leader>; <c-w>s
map <leader>` <c-w>v
map <leader>kb :NERDTreeToggle<cr>
map <leader>bi :BundleInstall<cr>
map <leader>so :so ~/.vimrc<cr>
" remove whitespace on save
autocmd BufWritePre * :%s/\s\+$//e
" Bundles
Bundle 'kien/ctrlp.vim'
Bundle 'vim-scripts/The-NERD-tree'
Bundle 'tpope/vim-markdown'
Bundle 'tpope/vim-commentary.git'
Bundle 'tpope/vim-surround'
Bundle 'jlangston/tomorrow-night-vim'
:silent! :colorscheme tomorrow-night
" snipmate
Bundle "MarcWeber/vim-addon-mw-utils"
Bundle "tomtom/tlib_vim"
Bundle "garbas/vim-snipmate"
" Status bar
Bundle 'bling/vim-airline'
" Tabularize
Bundle 'godlygeek/tabular'
map <Leader>e :Tabularize /=<cr>
map <Leader>c :Tabularize /:<cr>
map <Leader>es :Tabularize /=\zs<cr>
map <Leader>cs :Tabularize /:\zs<cr>
map <leader>rt :!rspec $(pwd)
" Bundle settings
let g:ctrlp_max_height=30
" lets make sure we don't show these files
set wildignore+=*/.git/*,*/.hg/*,*/.svn/*.,*/.DS_Store
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment