" Ruby vim settings " Indentation setlocal expandtab setlocal tabstop=2 setlocal softtabstop=2 setlocal shiftwidth=2 " Debugging nnoremap Zd obyebug nnoremap ZD Obyebug " RSpec nnoremap z :call RunCurrentSpecFile() \| call system("date '+%FT%T%z: z' >> ~/.vim/spec-stats.log") nnoremap Z :call RunNearestSpec() \| call system("date '+%FT%T%z: Z' >> ~/.vim/spec-stats.log") nnoremap 🕳 :call RunCurrentSpecFile() \| call system("date '+%FT%T%z: e' >> ~/.vim/spec-stats.log") nnoremap ⛳ :call RunNearestSpec() \| call system("date '+%FT%T%z: E' >> ~/.vim/spec-stats.log") " Reset Rails test database nnoremap :!RAILS_ENV=test bundle exec rake db:reset " Spring command! -buffer FuckSpring :!bundle exec spring stop " Convert from old to new hash syntax " Example: :%RubyNewHashSyntax gc command! -buffer -range -nargs=? RubyNewHashSyntax \ ,substitute/\v:<(\w+)> \=\>/\1:/