Skip to content

Commit 8e2cf13

Browse files
committed
Change :Rake fallback from default to --tasks
"Run the full test suite" is a pretty ridiculous default for a command that normally runs a precisely targeted task for the file at hand. Default to listing tasks instead.
1 parent 2c562c2 commit 8e2cf13

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

autoload/rails.vim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1215,6 +1215,9 @@ function! s:Rake(bang,lnum,arg)
12151215
if arg == ''
12161216
let arg = rails#buffer().default_rake_task(lnum)
12171217
endif
1218+
if arg == ''
1219+
let arg = '--tasks'
1220+
endif
12181221
if !has_key(self,'options') | let self.options = {} | endif
12191222
if arg == '-'
12201223
let arg = get(self.options,'last_rake_task','')
@@ -4856,7 +4859,7 @@ function! rails#buffer_setup() abort
48564859
if self.type_name('test', 'spec', 'cucumber')
48574860
call self.setvar('dispatch', ':Runner')
48584861
elseif self.name() ==# 'Rakefile'
4859-
call self.setvar('dispatch', ':Rake default')
4862+
call self.setvar('dispatch', ':Rake --tasks')
48604863
elseif self.name() =~# '^\%(app\|config\|db\|lib\|log\)'
48614864
call self.setvar('dispatch', ':Rake')
48624865
elseif self.name() =~# '^public'

0 commit comments

Comments
 (0)