Created
September 16, 2011 05:10
-
-
Save jondkinney/1221246 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 shell=/bin/sh "Need to start from a shell so that RVM is read in properly when using zsh as your shell. | |
nmap <leader>v :tabedit ~/.gvimrc.local<CR> | |
set macmeta "Need this to enable M and D | |
"Color Scheme | |
color jonkrails | |
"color AutumnLeaf | |
"Code Formatting | |
set linespace=1 | |
set gfn=Monaco:h12 | |
"Turn on Spell Check | |
set spell | |
" Shortcut to toggle `set list` which turns on and off the whitespace markers | |
nmap <leader>i :set list!<CR> | |
" Use the same symbols as TextMate for tabstops and EOLs | |
set listchars=tab:▸\ ,eol:¬ | |
"Window Splits | |
map <C-j> <C-w>j | |
map <C-k> <C-w>k | |
map <C-h> <C-w>h | |
map <C-l> <C-w>l | |
" Maps Alt-[h,j,k,l] to resizing a window split | |
map <silent> <A-h> <C-w>< | |
map <silent> <A-j> <C-W>- | |
map <silent> <A-k> <C-W>+ | |
map <silent> <A-l> <C-w>> | |
" Maps Alt-[s.v] to horizontal and vertical split respectively | |
map <silent> <A-s> :split<CR> | |
map <silent> <A-v> :vsplit<CR> | |
" Maps Alt-t to switch between the last opened buffer | |
nmap <A-t> :b#<Return> | |
"Tabs | |
map <S-Tab> :tabn<CR> | |
map <C-t> :tabnew<CR> | |
map <C-i> :tabp<CR> | |
map <C-o> :tabn<CR> | |
" Textmate indentation commands | |
nmap <D-[> << | |
nmap <D-]> >> | |
vmap <D-[> <gv | |
vmap <D-]> >gv | |
" Search options | |
" Press \h to toggle highlighting on/off, and show current value. | |
noremap <leader>h :set hlsearch! hlsearch?<CR> | |
nnoremap <esc> :noh<return><esc> | |
"Set relative numbering to be default (right now is only applying to nerdtree - the first window - which is annoying) | |
" set rnu | |
" NERDTree | |
" let NERDTreeShowLineNumbers=0 "Was trying this when I had 'set rnu global' | |
map \| :NERDTreeFind<CR> " File tree browser showing current file - pipe (shift-backslash) | |
"Toggle Relative Numbering | |
function! g:ToggleNuMode() | |
if(&rnu == 1) | |
set nu | |
else | |
set rnu | |
endif | |
endfunc | |
nnoremap <Leader>l :call g:ToggleNuMode()<CR> | |
"Focused rSpec tests | |
map <D-r> :SweetVimRspecRunFile<CR> "(CMD-r) or (Apple-r) | |
map <D-R> :SweetVimRspecRunFocused<CR> "(SHIFT-CMD-r) | |
map <M-D-r> :SweetVimRspecRunPrevious<CR> "(OPT-CMD-r) | |
"Status line with RVM & Git | |
set statusline=[%n]\ %<%.99f\ %h%w%m%r%y%{exists('g:loaded_rvm')?rvm#statusline():''}%=%-16(\ %l,%c-%v\ %)%P\ %#StatusLineNC#\ Git\ %#ErrorMsg#\ %{GitBranchInfoTokens()[0]}\ %#StatusLine# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment