Last active
January 3, 2016 22:29
-
-
Save codatory/8529174 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " Run in iMproved mode | |
filetype off " Required for Vundle | |
syntax on " Syntax highlighting rocks | |
set number " Line numbers in the gutter | |
set ruler " Show position in statusbar | |
" Whitespace stuff | |
set nowrap | |
set tabstop=2 | |
set shiftwidth=2 | |
set softtabstop=2 | |
set expandtab | |
set autoindent | |
set list listchars=tab:\ \ ,trail:· | |
" Searching | |
set hlsearch | |
set incsearch | |
set ignorecase | |
set smartcase | |
" Tab completion | |
set wildmode=list:longest,list:full | |
set wildignore+=*.o,*.obj,.git,*.rbc | |
" Show status bar | |
set laststatus=2 | |
" make and python use real tabs | |
au FileType make set noexpandtab | |
au FileType python set noexpandtab | |
" Thorfile, Rakefile and Gemfile are Ruby | |
au BufRead,BufNewFile {Gemfile,Rakefile,Thorfile,config.ru} set ft=ruby | |
" allow backspacing over everything in insert mode | |
set backspace=indent,eol,start | |
" Remove trailing whitespace | |
autocmd BufWritePre * :%s/\s\+$//e | |
" Directories for swp files | |
set backupdir=~/.vim/backup | |
set directory=~/.vim/backup | |
" Load Vundle | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
" let Vundle manage Vundle | |
" required! | |
Bundle 'gmarik/vundle' | |
" Install Airline | |
Bundle 'bling/vim-airline' | |
" Enable airline tab bar | |
let g:airline#extensions#tabline#enabled = 1 | |
" Syntastic syntax checking | |
Bundle 'scrooloose/syntastic' | |
" NERDTree | |
Bundle 'scrooloose/nerdtree' | |
let NERDTreeIgnore=['\.rbc$', '\~$'] | |
map <Leader>n :NERDTreeToggle<CR> | |
" Git Gutter | |
Bundle 'airblade/vim-gitgutter' | |
" Ruby | |
Bundle 'vim-ruby/vim-ruby' | |
Bundle 'tpope/vim-rvm' | |
autocmd BufEnter * Rvm | |
Bundle 't9md/vim-ruby-xmpfilter' | |
autocmd FileType ruby nmap <buffer> <Leader>m <Plug>(xmpfilter-mark) | |
autocmd FileType ruby xmap <buffer> <Leader>m <Plug>(xmpfilter-mark) | |
autocmd FileType ruby imap <buffer> <Leader>m <Plug>(xmpfilter-mark) | |
autocmd FileType ruby nmap <buffer> <Leader>r <Plug>(xmpfilter-run) | |
autocmd FileType ruby xmap <buffer> <Leader>r <Plug>(xmpfilter-run) | |
autocmd FileType ruby imap <buffer> <Leader>r <Plug>(xmpfilter-run) | |
Bundle 'tpope/vim-rails' | |
Bundle 'tpope/vim-bundler' | |
Bundle 'tpope/vim-rake' | |
Bundle 'tpope/vim-abolish' | |
Bundle 'tpope/vim-haml' | |
Bundle 'ecomba/vim-ruby-refactoring' | |
" Fuzzy file, buffer, mru, tag finder | |
Bundle 'kien/ctrlp.vim' | |
filetype plugin indent on " required! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Grab this file and put it in your ~/.vimrc
Run this to install Vundle:
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
Run this to create swp file path:
mkdir -p ~/.vim/backup
Add this to .bash_profile:
Restart your shell, vundle and you're off and running.