Skip to content

Instantly share code, notes, and snippets.

@brandoncc
Created January 15, 2015 03:57
Show Gist options
  • Save brandoncc/3534b2372992ef474be3 to your computer and use it in GitHub Desktop.
Save brandoncc/3534b2372992ef474be3 to your computer and use it in GitHub Desktop.
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#rc()
Plugin 'gmarik/Vundle.vim'
Plugin 'tpope/vim-unimpaired'
Plugin 'tpope/vim-repeat'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-rails.git'
Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-speeddating'
Plugin 'tpope/vim-sensible'
Plugin 'tpope/vim-bundler'
Plugin 'tpope/vim-ragtag'
Plugin 'tpope/vim-endwise'
Plugin 'tpope/vim-commentary'
Plugin 'tpope/vim-cucumber'
Plugin 'tpope/vim-markdown'
Plugin 'tpope/vim-haml'
Plugin 'vim-ruby/vim-ruby'
Plugin 'jgdavey/vim-blockle'
Plugin 'godlygeek/tabular'
Plugin 'kchmck/vim-coffee-script'
Plugin 'pangloss/vim-javascript'
Plugin 'jgdavey/vim-turbux'
Plugin 'skalnik/vim-vroom'
Plugin 'tpope/vim-vividchalk'
Plugin 'jgdavey/vim-railscasts'
Plugin 'mileszs/ack.vim'
Plugin 'ggreer/the_silver_searcher'
Plugin 'scrooloose/nerdtree'
Plugin 'kien/ctrlp.vim'
Plugin 'Lokaltog/vim-easymotion'
Plugin 'goldfeld/vim-seek'
Plugin 'vim-scripts/ZoomWin'
Plugin 'duff/vim-bufonly'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'mattn/gist-vim'
Plugin 'mattn/webapi-vim'
Plugin 'bling/vim-airline'
syntax on
filetype plugin indent on
set visualbell
set wildmenu
set wildmode=list:longest,full
set splitright
set splitbelow
set hidden
set guifont=Monaco:h16
set guioptions-=T guioptions-=e guioptions-=L guioptions-=r
set shell=zsh
set background=dark
set tabstop=2
set shiftwidth=2
set expandtab
set nofoldenable
set ignorecase smartcase
set autoindent
set backspace=indent,eol,start
set list
set number
iabbrev bpry require 'pry'; binding.pry;
augroup vimrc
autocmd!
autocmd GuiEnter * set columns=120 lines=70 number
augroup END
function! RenameFile()
let old_name = expand('%')
let new_name = input('New file name: ', expand('%'), 'file')
if new_name != '' && new_name != old_name
exec ':saveas ' . new_name
exec ':silent !rm ' . old_name
redraw!
endif
endfunction
map <leader>n :call RenameFile()<cr>
au BufWritePost .vimrc so ~/.vimrc
autocmd QuickFixCmdPost *grep* cwindow
colorscheme railscasts
let mapleader = ","
vmap D y'>p
imap <c-l> <space>=><space>
imap <c-c> <esc>
map <Left> <Nop>
map <Right> <Nop>
map <Up> <Nop>
map <Down> <Nop>
map Q <Nop>
map K <Nop>
cnoremap %% <C-R>=expand('%:h').'/'<cr>
nnoremap Y y$
xnoremap p pgvy
" rails
map <Leader>sc :sp db/schema.rb<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment