blob: c829abedc592f8e1340d87181766849bcfd8a5bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
" Ruby vim settings
" Indentation
setlocal expandtab
setlocal tabstop=2
setlocal softtabstop=2
setlocal shiftwidth=2
" Don't preserve indentation on empty lines
inoremap <buffer> <CR> <CR>
nnoremap <buffer> o o
nnoremap <buffer> O O
" Debugging
nnoremap <buffer> Zd obyebug<Esc>
nnoremap <buffer> ZD Obyebug<Esc>
" Reset Rails test database
nnoremap <buffer> <F7> :!RAILS_ENV=test bundle exec rake db:reset<CR>
" Spring
command! -buffer FuckSpring :!bundle exec spring stop
" Convert from old to new hash syntax
" Example: :%RubyNewHashSyntax gc
command! -buffer -range -nargs=? RubyNewHashSyntax
\ <line1>,<line2>substitute/\v:<(\w+)> \=\>/\1:/<args>
|