Created
April 4, 2012 18:48
-
-
Save groveriffic/2304677 to your computer and use it in GitHub Desktop.
My Vimrc
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 wildmode=list,longest | |
if has("gui_running") | |
colorscheme darkblue | |
set guifont=Bitstream\ Vera\ Sans\ Mono\ Bold:h13 | |
set guioptions-=T | |
endif | |
if has("gui_macvim") | |
map <SwipeLeft> :bprev<CR> | |
map <SwipeRight> :bnext<CR> | |
endif | |
set tabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
set autoindent | |
set backupdir=~/.vim/backup/ | |
set directory=~/.vim/backup/ | |
set incsearch | |
set hlsearch | |
" Leader is backslash | |
map <Leader>t :NERDTree<CR> | |
map <Leader>e :CommandTFlush<CR>:CommandT<CR> | |
map <Leader>b :CommandTJump<CR> | |
map <Leader>q :q<CR> | |
map <Leader>w :w<CR> | |
" Comment Visual Block | |
vmap # :s/^/#/<CR>gv | |
vmap - :s/^/-/<CR>gv | |
vmap <Tab> >gv | |
vmap <S-Tab> <gv | |
" Automatically reload ~/.vimrc when saved | |
" au BufWritePost .vimrc so ~/.vimrc | |
" Center search pattern | |
nnoremap <silent> n nzz | |
nnoremap <silent> N Nzz | |
nnoremap <silent> * *zz | |
nnoremap <silent> # #zz | |
nnoremap <silent> g* g*zz | |
nnoremap <silent> g# g#zz | |
au BufRead,BufNewFile {Capfile,Gemfile,Rakefile,Thorfile,config.ru,.caprc,.irbrc,irb_tempfile*} set ft=ruby |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment