Created
April 13, 2011 15:40
-
-
Save ryansch/917777 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
color ry-solarized | |
"color torte | |
"highlight NonText guifg=#4a4a59 | |
"highlight SpecialKey guifg=#4a4a59 | |
set guifont=Menlo:h12 | |
" Use the same symbols as TextMate for tabstops and EOLs | |
set listchars=tab:▸\ ,eol:¬ | |
" Enable special characters by default | |
set list | |
This file contains hidden or 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
unlet macvim_hig_shift_movement | |
let g:solarized_termcolors=16 | |
color solarized | |
set autoread | |
set noexpandtab | |
set wrap | |
if has("autocmd") | |
autocmd User Rails set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab | |
endif | |
let mapleader = "," | |
"update the system settings from my vimrc file | |
map <Leader>u :source ~/.vimrc | |
"copy/paste | |
map <Leader>c :w! ~/.vim_cpy_pst<cr> | |
map <Leader>v :r ~/.vim_cpy_pst<cr> | |
map <Leader>f :r ~/.functionheader<cr> | |
map <Leader>h :nohlsearch<cr> | |
map <Leader># :s/^/#/<cr>:nohlsearch<cr> | |
map <Leader>d :execute 'NERDTreeToggle ' . getcwd()<CR> | |
map <Leader>t :FufFile<CR> | |
map <Leader>b :FufBuffer<CR> | |
nmap <leader>l :set list!<CR> | |
" Spit out rspec args to file | |
" Thanks to Sam Goldstein (http://drasticcode.com/2009/8/27/how-to-run-rspec-specs-from-vim) | |
" Thanks to Ian Smith-Heisters | |
function! SpecArgs(args) | |
if exists("b:rails_root") | |
let fname = b:rails_root . "/.spec_args" | |
else | |
let fname = "~/.spec_args" | |
end | |
let current = expand("%") | |
let spec_args = [" " . current . " -cfn " . a:args] | |
call writefile(spec_args, fname) | |
endfunction | |
" Mappings | |
" run one rspec example or describe block based on cursor position | |
map <Leader>s :call SpecArgs("-l " . <C-r>=line('.')<CR>)<cr> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment