Skip to content

Commit 92d55a0

Browse files
committed
Provide dispatch.vim configuration
As of this time, I'm making the somewhat arbitrary decision of clobbering b:dispatch (which in my case, always contains generic Ruby config) but preserving b:start (which in my case, sometimes contains foreman start).
1 parent 525a0f6 commit 92d55a0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

autoload/rails.vim

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4523,6 +4523,14 @@ function! rails#buffer_setup() abort
45234523
endif
45244524
endif
45254525
endif
4526+
if self.type_name('test', 'spec', 'cucumber')
4527+
call self.setvar('dispatch', ':Rrunner')
4528+
else
4529+
call self.setvar('dispatch', ':Rake')
4530+
endif
4531+
if empty(self.getvar('start'))
4532+
call self.setvar('start', ':Rserver')
4533+
endif
45264534
endfunction
45274535

45284536
" }}}1

0 commit comments

Comments
 (0)