" When vimrc is edited, reload it autocmd! BufWritePost vimrc source ~/.vimrc set nocompatible " vi improved filetype off " do not load Filetype file set encoding=utf-8 set history=1000 set completeopt=menuone,preview set number " ####################### " ### Fuck you, hjkl! ### " ####################### noremap ; l noremap l k noremap k j noremap j h for prefix in ['i', 'n', 'v'] for key in ['', '', '', ''] exe prefix . "noremap " . key . " " endfor endfor " #################### " ### Vundle setup ### " #################### set rtp+=~/.vim/bundle/vundle/ call vundle#rc() Bundle 'gmarik/vundle' " ############## " ### Colors ### " ############## Bundle 'chriskempson/tomorrow-theme', {'rtp': 'vim/'} syntax on colorscheme Tomorrow-Night-Eighties " ################# " ### Powerline ### " ################# Bundle 'Lokaltog/vim-powerline' set laststatus=2 " ################ " ### Nerdtree ### " ################ Bundle 'scrooloose/nerdtree' nmap :NERDTreeToggle " ############ " ### Misc ### " ############ Bundle 'kien/ctrlp.vim' " Ruby support? Bundle 'vim-ruby/vim-ruby' " Magic R-commands Bundle 'tpope/vim-rails' autocmd FileType ruby,eruby,yaml set tw=80 ai sw=2 sts=2 et autocmd FileType ruby,eruby,yaml setlocal foldmethod=manual autocmd User Rails set tabstop=2 shiftwidth=2 softtabstop=2 expandtab " ########################## " ### Follow Your Leader ### " ########################## let mapleader = "," nmap q :q! nmap rc :source ~/.vimrc nmap bi :source ~/.vimrc:BundleInstall nmap gu :!git up nmap mkb :!mkbundle nmap m :Rmodel nmap c :Rcontroller nmap s :Rspec " ##################### " ### More Mappings ### " ##################### map :w imap :w imap $ imap ^