Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ready for release!

  • Loading branch information...
commit 6da36c24d846597b301f0400c617a610d8b4bf64 1 parent d4cdb82
@tpope authored
Showing with 17 additions and 12 deletions.
  1. +9 −10 doc/rails.txt
  2. +8 −2 plugin/rails.vim
View
19 doc/rails.txt
@@ -221,12 +221,12 @@ alternate and related files follow:
Current file Alternate file Related file ~
model unit test related migration
controller (in method) functional test template (view)
-template (view) helper controller (in method)
+template (view) helper controller (jump to method)
migration previous migration next migration
config/routes.rb config/database.yml config/environment.rb
Suggestions for further contexts to consider for the alternate file, related
-file, and file under the cursor, are welcome. They are subtly tweaked from
+file, and file under the cursor are welcome. They are subtly tweaked from
release to release.
Finally, one Vim feature that proves helpful in conjunction with the above is
@@ -245,18 +245,18 @@ A limited amount of completion with <Tab> is supported.
Call ruby script/{script} {options}.
*rails-:Rconsole*
-:Rconsole {options} Start script/console. On Windows this is backgrounded
- with |!start|.
+:Rconsole {options} Start script/console. On Windows this is launched in
+ the background with |!start|.
*rails-:Rbreakpointer*
:Rbreakpointer {options}
- Start script/console. On Windows this is backgrounded
- with |!start|.
+ Start script/breakpointer. On Windows this is
+ launched in the background with |!start|.
*rails-:Rrunner*
-:Rrunner {code} Executes {code} with script/runner. Different from
- :Rscript runner {code} in that code is passed as one
- argument.
+:Rrunner {code} Executes {code} with script/runner. Differs from
+ :Rscript runner {code} in that the code is passed as
+ one argument.
*rails-:Rgenerate*
:Rgenerate {options} Calls script/generate {options}, and then edits the
@@ -280,7 +280,6 @@ A limited amount of completion with <Tab> is supported.
other server using the same port. On non-Windows
systems, lsof must be installed for this to work.
-
==============================================================================
PARTIAL EXTRACTION *rails-partials*
View
10 plugin/rails.vim
@@ -452,11 +452,16 @@ endfunction
function! s:Rake(bang,arg)
let t = RailsFileType()
if a:arg == "stats"
+ " So you can see it in Windows
+ call s:QuickFixCmdPre()
exe "!".&makeprg." stats"
+ call s:QuickFixCmdPost()
return
elseif a:arg != ''
exe 'make '.a:arg
return
+ elseif exists("b:rails_default_rake_target")
+ exe 'make '.b:rails_default_rake_target
elseif t =~ '^test\>'
let meth = s:lastmethod()
if meth =~ '^test_'
@@ -465,10 +470,10 @@ function! s:Rake(bang,arg)
let call = ""
endif
exe "make ".s:sub(s:gsub(t,'-',':'),'unit$\|functional$','&s')." TEST=\"%:p\"".call
- elseif t=~ '^migration\>'
+ elseif t=~ '^migration\>' && RailsFilePath() !~ '\<db/schema\.rb$'
make db:migrate
elseif t=~ '^model\>'
- make test:units TEST=%:p:r:s?[\/]app[\/]models[\/]?/test/unit/?_test.rb
+ make test:units TEST="%:p:r:s?[\/]app[\/]models[\/]?/test/unit/?_test.rb"
elseif t=~ '^\<\%(controller\|helper\|view\)\>'
make test:functionals
else
@@ -1796,6 +1801,7 @@ function! s:CreateMenus() abort
exe s:sub(menucmd,'anoremenu','vnoremenu').' <silent> '.g:rails_installed_menu.'.E&xtract\ as\ partial\ :Rpartial :call <SID>menuprompt("'."'".'<,'."'".'>Rpartial","Partial name (e.g., template or /controller/template): ")<CR>'
exe menucmd.' '.g:rails_installed_menu.'.-HSep- :'
exe menucmd.'<silent> '.g:rails_installed_menu.'.&Help\ :help\ rails :call <SID>prephelp()<Bar>help rails<CR>'
+ exe menucmd.'<silent> '.g:rails_installed_menu.'.Abo&ut :call <SID>prephelp()<Bar>help rails-about<CR>'
let g:rails_did_menus = 1
call s:menuBufLeave()
endif
Please sign in to comment.
Something went wrong with that request. Please try again.