<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -13,7 +13,7 @@
 if &amp;cp || exists(&quot;g:autoloaded_rails&quot;)
   finish
 endif
-let g:autoloaded_rails = '3.3'
+let g:autoloaded_rails = '3.4'
 
 let s:cpo_save = &amp;cpo
 set cpo&amp;vim
@@ -90,9 +90,9 @@ function! s:pop_command()
   endif
 endfunction
 
-function! s:push_chdir()
+function! s:push_chdir(...)
   if !exists(&quot;s:command_stack&quot;) | let s:command_stack = [] | endif
-  if exists(&quot;b:rails_root&quot;) &amp;&amp; !s:startswith(getcwd(), rails#app().path())
+  if exists(&quot;b:rails_root&quot;) &amp;&amp; a:0 ? getcwd() !=# rails#app().path() : !s:startswith(getcwd(), rails#app().path())
     let chdir = exists(&quot;*haslocaldir&quot;) &amp;&amp; haslocaldir() ? &quot;lchdir &quot; : &quot;chdir &quot;
     call add(s:command_stack,chdir.s:escarg(getcwd()))
     exe chdir.s:escarg(rails#app().path())
@@ -329,6 +329,8 @@ function! s:model(...)
     return rails#singularize(s:sub(f,'.*&lt;%(test|spec)/fixtures/(.*)\.\w*\~=$','\1'))
   elseif f =~ '\&lt;\%(test\|spec\)/exemplars/.*_exemplar\.rb$'
     return s:sub(f,'.*&lt;%(test|spec)/exemplars/(.*)_exemplar\.rb$','\1')
+  elseif f =~ '\&lt;\%(test\|spec\)/factories/.*\.rb$'
+    return s:sub(f,'.*&lt;%(test|spec)/factories/(.{-})%(_factory)=\.rb$','\1')
   elseif a:0 &amp;&amp; a:1
     return rails#singularize(s:controller())
   endif
@@ -521,6 +523,8 @@ function! s:app_calculate_file_type(path) dict
     let r = &quot;spec&quot;
   elseif f =~ '_helper\.rb$'
     let r = &quot;helper&quot;
+  elseif f =~ '\&lt;app/metal/.*\.rb$'
+    let r = &quot;metal&quot;
   elseif f =~ '\&lt;app/models\&gt;'
     let top = join(s:readfile(full_path,50),&quot;\n&quot;)
     let class = matchstr(top,'\&lt;Acti\w\w\u\w\+\%(::\h\w*\)\+\&gt;')
@@ -594,21 +598,29 @@ function! s:app_environments() dict
   return copy(self.cache.get('environments'))
 endfunction
 
-&quot; Check for Test::Unit and rSpec by calling this method with an argument of
-&quot; 'test' or 'spec'.  Given no arguments, returns a list.
-function! s:app_test_suites(...) dict
-  if self.cache.needs('test_suites')
-    let suites = filter(['test','spec'],'isdirectory(self.path(v:val))')
-    call self.cache.set('test_suites',suites)
+function! s:app_has(feature) dict
+  let map = {
+        \'test': 'test/',
+        \'spec': 'spec/',
+        \'cucumber': 'features/',
+        \'sass': 'public/stylesheets/sass/'}
+  if self.cache.needs('features')
+    call self.cache.set('features',{})
   endif
-  if a:0
-    return index(self.cache.get('test_suites'),a:1) + 1
-  else
-    return copy(self.cache.get('test_suites'))
+  let features = self.cache.get('features')
+  if !has_key(features,a:feature)
+    let path = get(map,a:feature,a:feature.'/')
+    let features[a:feature] = isdirectory(rails#app().path(path))
   endif
+  return features[a:feature]
 endfunction
 
-call s:add_methods('app',['calculate_file_type','environments','test_suites'])
+&quot; Returns the subset of ['test', 'spec', 'cucumber'] present on the app.
+function! s:app_test_suites() dict
+  return filter(['test','spec','cucumber'],'self.has(v:val)')
+endfunction
+
+call s:add_methods('app',['calculate_file_type','environments','has','test_suites'])
 
 &quot; }}}1
 &quot; Ruby Execution {{{1
@@ -840,7 +852,7 @@ function! s:app_tags_command() dict
   else
     return s:error(&quot;ctags not found&quot;)
   endif
-  exe &quot;!&quot;.cmd.&quot; -f &quot;.s:escarg(self.path(&quot;tmp/tags&quot;)).&quot; --exclude=facebox.js --exclude=\&quot;*.*.js\&quot; --langmap=\&quot;ruby:+.rake.builder.rjs\&quot; -R &quot;.s:escarg(self.path())
+  exe '!'.cmd.' -f '.s:escarg(self.path(&quot;tmp/tags&quot;)).' -R --langmap=&quot;ruby:+.rake.builder.rjs&quot; '.g:rails_ctags_arguments.' '.s:escarg(self.path())
 endfunction
 
 call s:add_methods('app',['tags_command'])
@@ -967,106 +979,124 @@ let s:efm_backtrace='%D(in\ %f),'
       \.'%\\s%#[%f:%l:\ %#%m,'
       \.'%\\s%#%f:%l:\ %#%m'
 
-function! s:makewithruby(arg,...)
+function! s:makewithruby(arg,bang,...)
   if &amp;efm == s:efm
-    if a:0 ? a:1 : 1
+    if (a:0 ? a:1 : 1) &amp;&amp; !a:bang
       setlocal efm=\%-E-e:%.%#,\%+E%f:%l:\ parse\ error,%W%f:%l:\ warning:\ %m,%E%f:%l:in\ %*[^:]:\ %m,%E%f:%l:\ %m,%-C%\tfrom\ %f:%l:in\ %.%#,%-Z%\tfrom\ %f:%l,%-Z%p^,%-G%.%#
     endif
   endif
   let old_make = &amp;makeprg
   let &amp;l:makeprg = rails#app().ruby_shell_command(a:arg)
-  make
+  exe 'make'.(a:bang ? '!' : '')
   let &amp;l:makeprg = old_make
 endfunction
 
 function! s:Rake(bang,lnum,arg)
   let self = rails#app()
   let lnum = a:lnum &lt; 0 ? 0 : a:lnum
-  if &amp;l:makeprg !~# 'rake'
-    let old_make = &amp;makeprg
-    let &amp;makeprg = 'rake'
-  endif
-  let oldefm = &amp;efm
-  if a:bang
-    let &amp;l:errorformat = s:efm_backtrace
-  endif
-  let t = RailsFileType()
-  let arg = a:arg
-  if &amp;filetype == &quot;ruby&quot; &amp;&amp; arg == '' &amp;&amp; g:rails_modelines
-    let mnum = s:lastmethodline(lnum)
-    let str = getline(mnum).&quot;\n&quot;.getline(mnum+1).&quot;\n&quot;.getline(mnum+2).&quot;\n&quot;
-    let pat = '\s\+\zs.\{-\}\ze\%(\n\|\s\s\|#{\@!\|$\)'
-    let mat = matchstr(str,'#\s*rake'.pat)
-    let mat = s:sub(mat,'\s+$','')
-    if mat != &quot;&quot;
-      let arg = mat
+  let old_makeprg = &amp;l:makeprg
+  let old_errorformat = &amp;l:errorformat
+  try
+    if &amp;l:makeprg !~# 'rake'
+      let &amp;l:makeprg = 'rake'
     endif
-  endif
-  if arg == ''
-    let opt = s:getopt('task','bl')
-    if opt != ''
-      let arg = opt
+    let &amp;l:errorformat = a:bang ? s:efm_backtrace : s:efm
+    let t = RailsFileType()
+    let arg = a:arg
+    if &amp;filetype == &quot;ruby&quot; &amp;&amp; arg == '' &amp;&amp; g:rails_modelines
+      let mnum = s:lastmethodline(lnum)
+      let str = getline(mnum).&quot;\n&quot;.getline(mnum+1).&quot;\n&quot;.getline(mnum+2).&quot;\n&quot;
+      let pat = '\s\+\zs.\{-\}\ze\%(\n\|\s\s\|#{\@!\|$\)'
+      let mat = matchstr(str,'#\s*rake'.pat)
+      let mat = s:sub(mat,'\s+$','')
+      if mat != &quot;&quot;
+        let arg = mat
+      endif
     endif
-  endif
-  let withrubyargs = '-r ./config/boot -r '.s:rquote(self.path('config/environment')).' -e &quot;puts \%((in \#{Dir.getwd}))&quot; '
-  if arg =~# '^\%(stats\|routes\|secret\|notes\|db:\%(charset\|collation\|fixtures:identify\|version\)\)\%(:\|$\)'
-    &quot; So you can see the output even with an inadequate redirect
-    call s:push_chdir()
-    exe &quot;!&quot;.&amp;makeprg.&quot; &quot;.arg
-    call s:pop_command()
-  elseif arg =~ '^preview\&gt;'
-    exe (lnum == 0 ? '' : lnum).'R'.s:gsub(arg,':','/')
-  elseif arg =~ '^runner:'
-    let arg = s:sub(arg,'^runner:','')
-    let root = matchstr(arg,'%\%(:\w\)*')
-    let file = expand(root).matchstr(arg,'%\%(:\w\)*\zs.*')
-    if file =~ '#.*$'
-      let extra = &quot; -- -n &quot;.matchstr(file,'#\zs.*')
-      let file = s:sub(file,'#.*','')
-    else
-      let extra = ''
+    if arg == ''
+      let opt = s:getopt('task','bl')
+      if opt != ''
+        let arg = opt
+      else
+        let arg = s:default_rake_task(lnum)
+      endif
     endif
-    if self.has_file(file) || self.has_file(file.'.rb')
-      call s:makewithruby(withrubyargs.'-r&quot;'.file.'&quot;'.extra,file !~# '_\%(spec\|test\)\%(\.rb\)\=$')
+    let withrubyargs = '-r ./config/boot -r '.s:rquote(self.path('config/environment')).' -e &quot;puts \%((in \#{Dir.getwd}))&quot; '
+    if arg =~# '^notes\&gt;'
+      let &amp;l:errorformat = '%-P%f:,\ \ *\ [%*[\ ]%l]\ [%t%*[^]]] %m,\ \ *\ [%*[\ ]%l] %m,%-Q'
+      &quot; %D to chdir is apparently incompatible with %P multiline messages
+      call s:push_chdir(1)
+      exe 'make '.arg
+      call s:pop_command()
+      if a:bang
+        copen
+      endif
+    elseif arg =~# '^\%(stats\|routes\|secret\|time:zones\|db:\%(charset\|collation\|fixtures:identify\&gt;.*\|version\)\)\%(:\|$\)'
+      let &amp;l:errorformat = '%D(in\ %f),%+G%.%#'
+      exe 'make '.arg
+      if a:bang
+        copen
+      endif
+    elseif arg =~ '^preview\&gt;'
+      exe (lnum == 0 ? '' : lnum).'R'.s:gsub(arg,':','/')
+    elseif arg =~ '^runner:'
+      let arg = s:sub(arg,'^runner:','')
+      let root = matchstr(arg,'%\%(:\w\)*')
+      let file = expand(root).matchstr(arg,'%\%(:\w\)*\zs.*')
+      if file =~ '#.*$'
+        let extra = &quot; -- -n &quot;.matchstr(file,'#\zs.*')
+        let file = s:sub(file,'#.*','')
+      else
+        let extra = ''
+      endif
+      if self.has_file(file) || self.has_file(file.'.rb')
+        call s:makewithruby(withrubyargs.'-r&quot;'.file.'&quot;'.extra,a:bang,file !~# '_\%(spec\|test\)\%(\.rb\)\=$')
+      else
+        call s:makewithruby(withrubyargs.'-e '.s:esccmd(s:rquote(arg)),a:bang)
+      endif
+    elseif arg == 'run' || arg == 'runner'
+      call s:makewithruby(withrubyargs.'-r&quot;'.RailsFilePath().'&quot;',a:bang,RailsFilePath() !~# '_\%(spec\|test\)\%(\.rb\)\=$')
+    elseif arg =~ '^run:'
+      let arg = s:sub(arg,'^run:','')
+      let arg = s:sub(arg,'^\%:h',expand('%:h'))
+      let arg = s:sub(arg,'^%(\%|$|#@=)',expand('%'))
+      let arg = s:sub(arg,'#(\w+[?!=]=)$',' -- -n\1')
+      call s:makewithruby(withrubyargs.'-r'.arg,a:bang,arg !~# '_\%(spec\|test\)\.rb$')
     else
-      call s:makewithruby(withrubyargs.'-e '.s:esccmd(s:rquote(arg)))
+      exe 'make'.(a:bang ? '!' : '').' '.arg
     endif
-  elseif arg == 'run' || arg == 'runner'
-    call s:makewithruby(withrubyargs.'-r&quot;'.RailsFilePath().'&quot;',RailsFilePath() !~# '_\%(spec\|test\)\%(\.rb\)\=$')
-  elseif arg =~ '^run:'
-    let arg = s:sub(arg,'^run:','')
-    let arg = s:sub(arg,'^%:h',expand('%:h'))
-    let arg = s:sub(arg,'^%(\%|$|#@=)',expand('%'))
-    let arg = s:sub(arg,'#(\w+[?!=]=)$',' -- -n\1')
-    call s:makewithruby(withrubyargs.'-r'.arg,arg !~# '_\%(spec\|test\)\.rb$')
-  elseif arg != ''
-    exe 'make '.arg
-  elseif t =~ '^config-routes\&gt;'
-    call s:push_chdir()
-    exe &quot;!&quot;.&amp;makeprg.&quot; routes&quot;
-    call s:pop_command()
+  finally
+    let &amp;l:errorformat = old_errorformat
+    let &amp;l:makeprg = old_makeprg
+  endtry
+endfunction
+
+function! s:default_rake_task(lnum)
+  let self = rails#app()
+  let t = RailsFileType()
+  let lnum = a:lnum &lt; 0 ? 0 : a:lnum
+  if t =~ '^config-routes\&gt;'
+    return 'routes'
   elseif t =~ '^fixtures-yaml\&gt;' &amp;&amp; lnum
-    call s:push_chdir()
-    exe &quot;!&quot;.&amp;makeprg.&quot; db:fixtures:identify LABEL=&quot;.s:lastmethod(lnum)
-    call s:pop_command()
+    return &quot;db:fixtures:identify LABEL=&quot;.s:lastmethod(lnum)
   elseif t =~ '^fixtures\&gt;' &amp;&amp; lnum == 0
-    exe &quot;make db:fixtures:load FIXTURES=&quot;.s:sub(fnamemodify(RailsFilePath(),':r'),'^.{-}/fixtures/','')
+    return &quot;db:fixtures:load FIXTURES=&quot;.s:sub(fnamemodify(RailsFilePath(),':r'),'^.{-}/fixtures/','')
   elseif t =~ '^task\&gt;'
     let mnum = s:lastmethodline(lnum)
     let line = getline(mnum)
     &quot; We can't grab the namespace so only run tasks at the start of the line
-    if line =~ '^\%(task\|file\)\&gt;'
-      exe 'make '.s:lastmethod(lnum)
+    if line =~# '^\%(task\|file\)\&gt;'
+      return s:lastmethod(a:lnum)
     else
-      make
+      return ''
     endif
   elseif t =~ '^spec\&gt;'
     if RailsFilePath() =~# '\&lt;spec/spec_helper\.rb$'
-      make spec SPEC_OPTS=
+      return 'spec SPEC_OPTS='
     elseif lnum &gt; 0
-      exe 'make spec SPEC=&quot;%:p&quot; SPEC_OPTS=--line='.lnum
+      return 'spec SPEC=&quot;%:p&quot; SPEC_OPTS=--line='.lnum
     else
-      make spec SPEC=&quot;%:p&quot; SPEC_OPTS=
+      return 'spec SPEC=&quot;%:p&quot; SPEC_OPTS='
     endif
   elseif t =~ '^test\&gt;'
     let meth = s:lastmethod(lnum)
@@ -1076,56 +1106,50 @@ function! s:Rake(bang,lnum,arg)
       let call = &quot;&quot;
     endif
     if t =~ '^test-\%(unit\|functional\|integration\)$'
-      exe &quot;make &quot;.s:sub(s:gsub(t,'-',':'),'unit$|functional$','&amp;s').&quot; TEST=\&quot;%:p\&quot;&quot;.s:sub(call,'^ ',' TESTOPTS=')
+      return s:sub(s:gsub(t,'-',':'),'unit$|functional$','&amp;s').&quot; TEST=\&quot;%:p\&quot;&quot;.s:sub(call,'^ ',' TESTOPTS=')
     elseif RailsFilePath() =~# '\&lt;test/test_helper\.rb$'
-      make test
+      return 'test'
     else
-      call s:makewithruby('-e &quot;puts \%((in \#{Dir.getwd}))&quot; -r&quot;%:p&quot; -- '.call,0)
+      return &quot;test:recent TEST=\&quot;%:p\&quot;&quot;.s:sub(call,'^ ',' TESTOPTS=')
     endif
   elseif t=~ '^\%(db-\)\=migration\&gt;' &amp;&amp; RailsFilePath() !~# '\&lt;db/schema\.rb$'
     let ver = matchstr(RailsFilePath(),'\&lt;db/migrate/0*\zs\d*\ze_')
     if ver != &quot;&quot;
       let method = s:lastmethod(lnum)
       if method == &quot;down&quot;
-        exe &quot;make db:migrate:down VERSION=&quot;.ver
+        return &quot;db:migrate:down VERSION=&quot;.ver
       elseif method == &quot;up&quot;
-        exe &quot;make db:migrate:up VERSION=&quot;.ver
+        return &quot;db:migrate:up VERSION=&quot;.ver
       elseif lnum &gt; 0
-        exe &quot;make db:migrate:down db:migrate:up VERSION=&quot;.ver
+        return &quot;db:migrate:down db:migrate:up VERSION=&quot;.ver
       else
-        exe &quot;make db:migrate VERSION=&quot;.ver
+        return &quot;db:migrate VERSION=&quot;.ver
       endif
     else
-      make db:migrate
+      return 'db:migrate'
     endif
-  elseif self.test_suites('spec') &amp;&amp; RailsFilePath() =~# '^app/.*\.rb' &amp;&amp; self.has_file(s:sub(RailsFilePath(),'^app/(.*)\.rb$','spec/\1_spec.rb'))
-    make spec SPEC=&quot;%:p:r:s?[\/]app[\/]?/spec/?_spec.rb&quot; SPEC_OPTS=
+  elseif self.has('spec') &amp;&amp; RailsFilePath() =~# '^app/.*\.rb' &amp;&amp; self.has_file(s:sub(RailsFilePath(),'^app/(.*)\.rb$','spec/\1_spec.rb'))
+    return 'spec SPEC=&quot;%:p:r:s?[\/]app[\/]?/spec/?_spec.rb&quot; SPEC_OPTS='
   elseif t=~ '^model\&gt;'
-    make test:units TEST=&quot;%:p:r:s?[\/]app[\/]models[\/]?/test/unit/?_test.rb&quot;
+    return 'test:units TEST=&quot;%:p:r:s?[\/]app[\/]models[\/]?/test/unit/?_test.rb&quot;'
   elseif t=~ '^api\&gt;'
-    make test:units TEST=&quot;%:p:r:s?[\/]app[\/]apis[\/]?/test/functional/?_test.rb&quot;
+    return 'test:units TEST=&quot;%:p:r:s?[\/]app[\/]apis[\/]?/test/functional/?_test.rb&quot;'
   elseif t=~ '^\&lt;\%(controller\|helper\|view\)\&gt;'
     if RailsFilePath() =~ '\&lt;app/' &amp;&amp; s:controller() !~# '^\%(application\)\=$'
-      exe 'make test:functionals TEST=&quot;'.s:escarg(rails#app().path('test/functional/'.s:controller().'_controller_test.rb')).'&quot;'
+      return 'test:functionals TEST=&quot;'.s:escarg(self.path('test/functional/'.s:controller().'_controller_test.rb')).'&quot;'
     else
-      make test:functionals
+      return 'test:functionals'
     endif
   elseif t =~ '^cucumber-feature\&gt;'
     if lnum &gt; 0
-      exe 'make features FEATURE=&quot;%:p&quot;:'.lnum
+      return 'features FEATURE=&quot;%:p&quot;:'.lnum
     else
-      make features FEATURE=&quot;%:p&quot;
+      return 'features FEATURE=&quot;%:p&quot;'
     endif
   elseif t =~ '^cucumber\&gt;'
-    make features
+    return 'features'
   else
-    make
-  endif
-  if oldefm != ''
-    let &amp;l:errorformat = oldefm
-  endif
-  if exists('old_make')
-    let &amp;l:makeprg = old_make
+    return ''
   endif
 endfunction
 
@@ -1391,7 +1415,7 @@ function! s:app_generate_command(bang,...) dict
   endif
   if !self.execute_ruby_command(&quot;script/generate &quot;.target.str) &amp;&amp; file != &quot;&quot;
     call self.cache.clear('user_classes')
-    call self.cache.clear('test_suites')
+    call self.cache.clear('features')
     if file =~ '^db/migrate/\d\d\d\d'
       let file = get(self.relglob('',s:sub(file,'\d+','[0-9]*[0-9]')),-1,file)
     endif
@@ -1422,7 +1446,7 @@ function! s:Complete_script(ArgLead,CmdLine,P)
       return s:modelList(a:ArgLead,&quot;&quot;,&quot;&quot;)
     elseif target ==# 'migration' || target ==# 'session_migration'
       return s:migrationList(a:ArgLead,&quot;&quot;,&quot;&quot;)
-    elseif target ==# 'integration_test'
+    elseif target ==# 'integration_test' || target ==# 'feature'
       return s:integrationtestList(a:ArgLead,&quot;&quot;,&quot;&quot;)
     elseif target ==# 'observer'
       let observers = s:observerList(&quot;&quot;,&quot;&quot;,&quot;&quot;)
@@ -1515,6 +1539,10 @@ function! s:djump(def)
   let def = s:sub(a:def,'^[#:]','')
   if def =~ '^\d\+$'
     exe def
+  elseif def =~ '^!'
+    if expand('%') !~ '://' &amp;&amp; !isdirectory(expand('%:p:h'))
+      call mkdir(expand('%:p:h'),'p')
+    endif
   elseif def != ''
     let ext = matchstr(def,'\.\zs.*')
     let def = matchstr(def,'[^.]*')
@@ -1545,9 +1573,9 @@ function! s:Find(bang,count,arg,...)
       let i += 1
     endwhile
     let file = a:{i}
-    let tail = matchstr(file,'#.*$\|:\d*\%(:in\&gt;.*\)\=$')
+    let tail = matchstr(file,'[#!].*$\|:\d*\%(:in\&gt;.*\)\=$')
     if tail != &quot;&quot;
-      let file = s:sub(file,'#.*$|:\d*%(:in&gt;.*)=$','')
+      let file = s:sub(file,'[#!].*$|:\d*%(:in&gt;.*)=$','')
     endif
     if file != &quot;&quot;
       let file = s:RailsIncludefind(file)
@@ -1703,6 +1731,9 @@ function! s:RailsFind()
   if res != &quot;&quot;|return res.&quot;\n&quot;.s:findview(res)|endif
   let res = s:findamethod('render\s*:\%(template\|action\)\s\+=&gt;\s*','\1.'.format.'\n\1')
   if res != &quot;&quot;|return res|endif
+  let res = s:sub(s:findamethod('render','\1'),'^/','')
+  if RailsFileType() =~ '^view\&gt;' | let res = s:sub(res,'[^/]+$','_&amp;') | endif
+  if res != &quot;&quot;|return res.&quot;\n&quot;.s:findview(res)|endif
   let res = s:findamethod('redirect_to\s*(\=\s*:action\s\+=&gt;\s*','\1')
   if res != &quot;&quot;|return res|endif
   let res = s:findfromview('stylesheet_link_tag','public/stylesheets/\1.css')
@@ -1756,12 +1787,9 @@ endfunction
 
 function! s:RailsIncludefind(str,...)
   if a:str ==# &quot;ApplicationController&quot;
-    return &quot;app/controllers/application.rb&quot;
+    return &quot;application_controller.rb\napp/controllers/application.rb&quot;
   elseif a:str ==# &quot;Test::Unit::TestCase&quot;
     return &quot;test/unit/testcase.rb&quot;
-  elseif a:str == &quot;&lt;%=&quot;
-    &quot; Probably a silly idea
-    return &quot;action_view.rb&quot;
   endif
   let str = a:str
   if a:0 == 1
@@ -1826,7 +1854,6 @@ function! s:RailsIncludefind(str,...)
       endif
     endwhile
   elseif str =~# '_\%(path\|url\)$'
-    &quot; REST helpers
     let str = s:sub(str,'_%(path|url)$','')
     let str = s:sub(str,'^hash_for_','')
     let file = rails#app().named_route_file(str)
@@ -1877,6 +1904,7 @@ endfunction
 function! s:BufFinderCommands()
   command! -buffer -bar -nargs=+ Rnavcommand :call s:Navcommand(&lt;bang&gt;0,&lt;f-args&gt;)
   command! -buffer -bar -nargs=+ Rcommand    :call s:warn(&quot;Warning: :Rcommand has been deprecated in favor of :Rnavcommand&quot;)|call s:Navcommand(&lt;bang&gt;0,&lt;f-args&gt;)
+  call s:addfilecmds(&quot;metal&quot;)
   call s:addfilecmds(&quot;model&quot;)
   call s:addfilecmds(&quot;view&quot;)
   call s:addfilecmds(&quot;controller&quot;)
@@ -1886,14 +1914,14 @@ function! s:BufFinderCommands()
   call s:addfilecmds(&quot;api&quot;)
   call s:addfilecmds(&quot;layout&quot;)
   call s:addfilecmds(&quot;fixtures&quot;)
-  if rails#app().test_suites('test') || rails#app().test_suites('spec')
+  if rails#app().has('test') || rails#app().has('spec')
     call s:addfilecmds(&quot;unittest&quot;)
     call s:addfilecmds(&quot;functionaltest&quot;)
   endif
-  if rails#app().test_suites('test')
+  if rails#app().has('test') || rails#app().has('cucumber')
     call s:addfilecmds(&quot;integrationtest&quot;)
   endif
-  if rails#app().test_suites('spec')
+  if rails#app().has('spec')
     call s:addfilecmds(&quot;spec&quot;)
   endif
   call s:addfilecmds(&quot;stylesheet&quot;)
@@ -1989,6 +2017,10 @@ function! s:javascriptList(A,L,P)
   return s:completion_filter(rails#app().relglob(&quot;public/javascripts/&quot;,&quot;**/*&quot;,&quot;.js&quot;),a:A)
 endfunction
 
+function! s:metalList(A,L,P)
+  return s:autocamelize(rails#app().relglob(&quot;app/metal/&quot;,&quot;**/*&quot;,&quot;.rb&quot;),a:A)
+endfunction
+
 function! s:modelList(A,L,P)
   let models = rails#app().relglob(&quot;app/models/&quot;,&quot;**/*&quot;,&quot;.rb&quot;)
   call filter(models,'v:val !~# &quot;_observer$&quot;')
@@ -2020,10 +2052,10 @@ endfunction
 
 function! s:unittestList(A,L,P)
   let found = []
-  if rails#app().test_suites('test')
+  if rails#app().has('test')
     let found += rails#app().relglob(&quot;test/unit/&quot;,&quot;**/*&quot;,&quot;_test.rb&quot;)
   endif
-  if rails#app().test_suites('spec')
+  if rails#app().has('spec')
     let found += rails#app().relglob(&quot;spec/models/&quot;,&quot;**/*&quot;,&quot;_spec.rb&quot;)
   endif
   return s:autocamelize(found,a:A)
@@ -2031,17 +2063,24 @@ endfunction
 
 function! s:functionaltestList(A,L,P)
   let found = []
-  if rails#app().test_suites('test')
+  if rails#app().has('test')
     let found += rails#app().relglob(&quot;test/functional/&quot;,&quot;**/*&quot;,&quot;_test.rb&quot;)
   endif
-  if rails#app().test_suites('spec')
+  if rails#app().has('spec')
     let found += rails#app().relglob(&quot;spec/controllers/&quot;,&quot;**/*&quot;,&quot;_spec.rb&quot;)
   endif
   return s:autocamelize(found,a:A)
 endfunction
 
 function! s:integrationtestList(A,L,P)
-  return s:autocamelize(rails#app().relglob(&quot;test/integration/&quot;,&quot;**/*&quot;,&quot;_test.rb&quot;),a:A)
+  let found = []
+  if rails#app().has('test')
+    let found += s:autocamelize(rails#app().relglob(&quot;test/integration/&quot;,&quot;**/*&quot;,&quot;_test.rb&quot;),a:A)
+  endif
+  if rails#app().has('cucumber')
+    let found += s:completion_filter(rails#app().relglob(&quot;features/&quot;,&quot;**/*&quot;,&quot;.feature&quot;),a:A)
+  endif
+  return found
 endfunction
 
 function! s:specList(A,L,P)
@@ -2162,15 +2201,18 @@ function! s:CommandEdit(bang,cmd,name,prefix,suffix,filter,default,...)
   endif
 endfunction
 
-function! s:EditSimpleRb(bang,cmd,name,target,prefix,suffix)
+function! s:EditSimpleRb(bang,cmd,name,target,prefix,suffix,...)
   let cmd = s:findcmdfor(a:cmd.(a:bang?'!':''))
   if a:target == &quot;&quot;
     &quot; Good idea to emulate error numbers like this?
     return s:error(&quot;E471: Argument required&quot;)
   endif
-  let f = rails#underscore(a:target)
-  let jump = matchstr(f,'#.*\|:\d*\%(:in\)\=$')
-  let f = s:sub(f,'#.*|:\d*%(:in)=$','')
+  let f = a:0 ? a:target : rails#underscore(a:target)
+  let jump = matchstr(f,'[#!].*\|:\d*\%(:in\)\=$')
+  let f = s:sub(f,'[#!].*|:\d*%(:in)=$','')
+  if jump =~ '^!'
+    let cmd = s:editcmdfor(cmd)
+  endif
   if f == '.'
     let f = s:sub(f,'\.$','')
   else
@@ -2241,6 +2283,14 @@ function! s:fixturesEdit(bang,cmd,...)
   endif
 endfunction
 
+function! s:metalEdit(bang,cmd,...)
+  if a:0
+    call s:EditSimpleRb(a:bang,a:cmd,&quot;metal&quot;,a:1,&quot;app/metal/&quot;,&quot;.rb&quot;)
+  else
+    call s:EditSimpleRb(a:bang,a:cmd,&quot;metal&quot;,'config/boot',&quot;&quot;,&quot;.rb&quot;)
+  endif
+endfunction
+
 function! s:modelEdit(bang,cmd,...)
   call s:EditSimpleRb(a:bang,a:cmd,&quot;model&quot;,a:0? a:1 : s:model(1),&quot;app/models/&quot;,&quot;.rb&quot;)
 endfunction
@@ -2250,8 +2300,8 @@ function! s:observerEdit(bang,cmd,...)
 endfunction
 
 function! s:viewEdit(bang,cmd,...)
-  if a:0
-    let view = a:1
+  if a:0 &amp;&amp; a:1 =~ '^[^!#:]'
+    let view = matchstr(a:1,'[^!#:]*')
   elseif RailsFileType() == 'controller'
     let view = s:lastmethod()
   else
@@ -2270,9 +2320,15 @@ function! s:viewEdit(bang,cmd,...)
   let file = &quot;app/views/&quot;.view
   let found = s:findview(view)
   if found != ''
+    let dir = fnamemodify(rails#app().path(found),':h')
+    if !isdirectory(dir)
+      if a:0 &amp;&amp; a:1 =~ '!'
+        call mkdir(dir)
+      else
+        return s:error('No such directory')
+      endif
+    endif
     call s:edit(a:cmd.(a:bang?'!':''),found)
-  elseif file =~ '\.\w\+\.\w\+$' || file =~ '\.'.s:viewspattern().'$'
-    call s:edit(a:cmd.(a:bang?'!':''),file)
   elseif file =~ '\.\w\+$'
     call s:findedit(a:cmd.(a:bang?'!':''),file)
   else
@@ -2329,14 +2385,9 @@ endfunction
 
 function! s:layoutEdit(bang,cmd,...)
   if a:0
-    let c = rails#underscore(a:1)
-  else
-    let c = s:controller(1)
-  endif
-  if c == &quot;&quot;
-    let c = &quot;application&quot;
+    return s:viewEdit(a:bang,a:cmd,&quot;layouts/&quot;.a:1)
   endif
-  let file = s:findlayout(c)
+  let file = s:findlayout(s:controller(1))
   if file == &quot;&quot;
     let file = s:findlayout(&quot;application&quot;)
   endif
@@ -2371,62 +2422,99 @@ function! s:apiEdit(bang,cmd,...)
 endfunction
 
 function! s:stylesheetEdit(bang,cmd,...)
-  return s:EditSimpleRb(a:bang,a:cmd,&quot;stylesheet&quot;,a:0? a:1 : s:controller(1),&quot;public/stylesheets/&quot;,&quot;.css&quot;)
+  let name = a:0 ? a:1 : s:controller(1)
+  if rails#app().has('sass') &amp;&amp; rails#app().has_file('public/stylesheets/sass/'.name.'.sass')
+    return s:EditSimpleRb(a:bang,a:cmd,&quot;stylesheet&quot;,name,&quot;public/stylesheets/sass/&quot;,&quot;.sass&quot;,1)
+  else
+    return s:EditSimpleRb(a:bang,a:cmd,&quot;stylesheet&quot;,name,&quot;public/stylesheets/&quot;,&quot;.css&quot;,1)
+  endif
 endfunction
 
 function! s:javascriptEdit(bang,cmd,...)
-  return s:EditSimpleRb(a:bang,a:cmd,&quot;javascript&quot;,a:0? a:1 : &quot;application&quot;,&quot;public/javascripts/&quot;,&quot;.js&quot;)
+  return s:EditSimpleRb(a:bang,a:cmd,&quot;javascript&quot;,a:0? a:1 : &quot;application&quot;,&quot;public/javascripts/&quot;,&quot;.js&quot;,1)
 endfunction
 
 function! s:unittestEdit(bang,cmd,...)
-  let cmd = s:findcmdfor(a:cmd.(a:bang?'!':''))
-  let f = rails#underscore(a:0 ? a:1 : s:model(1))
+  let f = rails#underscore(a:0 ? matchstr(a:1,'[^!#:]*') : s:model(1))
+  let jump = a:0 ? matchstr(a:1,'[!#:].*') : ''
+  if jump =~ '!'
+    let cmd = s:editcmdfor(a:cmd.(a:bang?'!':''))
+  else
+    let cmd = s:findcmdfor(a:cmd.(a:bang?'!':''))
+  endif
   let mapping = {'test': ['test/unit/','_test.rb'], 'spec': ['spec/models/','_spec.rb']}
-  let tests = map(rails#app().test_suites(),'get(mapping,v:val,&quot;test&quot;)')
+  let tests = map(filter(rails#app().test_suites(),'has_key(mapping,v:val)'),'get(mapping,v:val)')
   if empty(tests)
-    let tests = [mapping[tests]]
+    let tests = [mapping['test']]
   endif
   for [prefix, suffix] in tests
     if !a:0 &amp;&amp; RailsFileType() =~# '^model-aro\&gt;' &amp;&amp; f != '' &amp;&amp; f !~# '_observer$'
       if rails#app().has_file(prefix.f.'_observer'.suffix)
-        return s:findedit(cmd,prefix.f.'_observer'.suffix)
+        return s:findedit(cmd,prefix.f.'_observer'.suffix.jump)
       endif
     endif
   endfor
   for [prefix, suffix] in tests
     if rails#app().has_file(prefix.f.suffix)
-      return s:findedit(cmd,prefix.f.suffix)
+      return s:findedit(cmd,prefix.f.suffix.jump)
     endif
   endfor
-  return s:findedit(cmd,tests[0][0].f.tests[0][1])
+  return s:EditSimpleRb(a:bang,a:cmd,&quot;unittest&quot;,f.jump,tests[0][0],tests[0][1],1)
 endfunction
 
 function! s:functionaltestEdit(bang,cmd,...)
-  let cmd = s:findcmdfor(a:cmd.(a:bang?'!':''))
-  let f = rails#underscore(a:0 ? a:1 : s:controller(1))
+  let f = rails#underscore(a:0 ? matchstr(a:1,'[^!#:]*') : s:controller(1))
+  let jump = a:0 ? matchstr(a:1,'[!#:].*') : ''
+  if jump =~ '!'
+    let cmd = s:editcmdfor(a:cmd.(a:bang?'!':''))
+  else
+    let cmd = s:findcmdfor(a:cmd.(a:bang?'!':''))
+  endif
   let mapping = {'test': ['test/functional/','_test.rb'], 'spec': ['spec/controllers/','_spec.rb']}
-  let tests = map(rails#app().test_suites(),'get(mapping,v:val,&quot;test&quot;)')
+  let tests = map(filter(rails#app().test_suites(),'has_key(mapping,v:val)'),'get(mapping,v:val)')
   if empty(tests)
     let tests = [mapping[tests]]
   endif
   for [prefix, suffix] in tests
     if rails#app().has_file(prefix.f.suffix)
-      return s:findedit(cmd,prefix.f.suffix)
+      return s:findedit(cmd,prefix.f.suffix.jump)
     elseif rails#app().has_file(prefix.f.'_controller'.suffix)
-      return s:findedit(cmd,prefix.f.'_controller'.suffix)
+      return s:findedit(cmd,prefix.f.'_controller'.suffix.jump)
     elseif rails#app().has_file(prefix.f.'_api'.suffix)
-      return s:findedit(cmd,prefix.f.'_api'.suffix)
+      return s:findedit(cmd,prefix.f.'_api'.suffix.jump)
     endif
   endfor
-  return s:findedit(cmd,tests[0][0].f.tests[0][1])
+  return s:EditSimpleRb(a:bang,a:cmd,&quot;functionaltest&quot;,f.jump,tests[0][0],tests[0][1],1)
 endfunction
 
 function! s:integrationtestEdit(bang,cmd,...)
-  if a:0
-    return s:EditSimpleRb(a:bang,a:cmd,&quot;integrationtest&quot;,a:1,&quot;test/integration/&quot;,&quot;_test.rb&quot;)
+  if !a:0
+    if rails#app().has('cucumber')
+      return s:EditSimpleRb(a:bang,a:cmd,&quot;integrationtest&quot;,&quot;support/env&quot;,&quot;features/&quot;,&quot;.rb&quot;)
+    else
+      return s:EditSimpleRb(a:bang,a:cmd,&quot;integrationtest&quot;,&quot;test_helper&quot;,&quot;test/&quot;,&quot;.rb&quot;)
+    endif
+  endif
+  let f = rails#underscore(matchstr(a:1,'[^!#:]*'))
+  let jump = matchstr(a:1,'[!#:].*')
+  if jump =~ '!'
+    let cmd = s:editcmdfor(a:cmd.(a:bang?'!':''))
   else
-    call s:EditSimpleRb(a:bang,a:cmd,&quot;integrationtest&quot;,&quot;test_helper&quot;,&quot;test/&quot;,&quot;.rb&quot;)
+    let cmd = s:findcmdfor(a:cmd.(a:bang?'!':''))
+  endif
+  let mapping = {'test': ['test/integration/','_test.rb'], 'cucumber': ['features/','.feature']}
+  let tests = map(filter(rails#app().test_suites(),'has_key(mapping,v:val)'),'get(mapping,v:val)')
+  if empty(tests)
+    let tests = [mapping['test']]
   endif
+  for [prefix, suffix] in tests
+    if rails#app().has_file(prefix.f.suffix)
+      return s:findedit(cmd,prefix.f.suffix.jump)
+    elseif rails#app().has_file(prefix.rails#underscore(f).suffix)
+      return s:findedit(cmd,prefix.rails#underscore(f).suffix.jump)
+    endif
+  endfor
+  return s:EditSimpleRb(a:bang,a:cmd,&quot;integrationtest&quot;,f.jump,tests[0][0],tests[0][1],1)
 endfunction
 
 function! s:specEdit(bang,cmd,...)
@@ -2556,9 +2644,9 @@ function! s:findedit(cmd,files,...) abort
   else
     let file = get(filter(copy(files),'rails#app().has_file(s:sub(v:val,&quot;#.*|:\\d*$&quot;,&quot;&quot;))'),0,get(files,0,''))
   endif
-  if file =~ '#\|:\d*\%(:in\)\=$'
-    let djump = matchstr(file,'#\zs.*\|:\zs\d*\ze\%(:in\)\=$')
-    let file = s:sub(file,'#.*|:\d*%(:in)=$','')
+  if file =~ '[#!]\|:\d*\%(:in\)\=$'
+    let djump = matchstr(file,'!.*\|#\zs.*\|:\zs\d*\ze\%(:in\)\=$')
+    let file = s:sub(file,'[#!].*|:\d*%(:in)=$','')
   else
     let djump = ''
   endif
@@ -3023,14 +3111,14 @@ function! s:invertrange(beg,end)
       return -1
     endif
     if add == &quot;&quot;
-      let add = s:sub(line,'^\s*\zs.*','raise ActiveRecord::IrreversableMigration')
+      let add = s:sub(line,'^\s*\zs.*','raise ActiveRecord::IrreversibleMigration')
     elseif add == &quot; &quot;
       let add = &quot;&quot;
     endif
     let str = add.&quot;\n&quot;.str
     let lnum += 1
   endwhile
-  let str = s:gsub(str,'(\s*raise ActiveRecord::IrreversableMigration\n)+','\1')
+  let str = s:gsub(str,'(\s*raise ActiveRecord::IrreversibleMigration\n)+','\1')
   return str
 endfunction
 
@@ -3064,12 +3152,9 @@ function! s:Invert(bang)
   if beg + 1 &lt; end
     exe (beg+1).&quot;,&quot;.(end-1).&quot;delete _&quot;
   endif
-  if str != &quot;&quot;
-    let reg_keep = @&quot;
-    let @&quot; = str
-    exe beg.&quot;put&quot;
+  if str != ''
+    exe beg.'put =str'
     exe 1+beg
-    let @&quot; = reg_keep
   endif
 endfunction
 
@@ -3134,9 +3219,10 @@ function! s:helpermethods()
         \.&quot;atom_feed auto_discovery_link_tag auto_link &quot;
         \.&quot;benchmark button_to button_to_function button_to_remote &quot;
         \.&quot;cache capture cdata_section check_box check_box_tag collection_select concat content_for content_tag content_tag_for current_cycle cycle &quot;
-        \.&quot;date_select datetime_select debug define_javascript_functions distance_of_time_in_words distance_of_time_in_words_to_now div_for dom_class dom_id draggable_element draggable_element_js drop_receiving_element drop_receiving_element_js &quot;
+        \.&quot;date_select datetime_select debug distance_of_time_in_words distance_of_time_in_words_to_now div_for dom_class dom_id draggable_element draggable_element_js drop_receiving_element drop_receiving_element_js &quot;
         \.&quot;error_message_on error_messages_for escape_javascript escape_once evaluate_remote_response excerpt &quot;
         \.&quot;field_set_tag fields_for file_field file_field_tag form form_for form_remote_for form_remote_tag form_tag &quot;
+        \.&quot;grouped_options_for_select &quot;
         \.&quot;hidden_field hidden_field_tag highlight &quot;
         \.&quot;image_path image_submit_tag image_tag input &quot;
         \.&quot;javascript_cdata_section javascript_include_tag javascript_path javascript_tag &quot;
@@ -3203,7 +3289,7 @@ function! s:BufSyntax()
       endif
       if t =~ '^model$' || t =~ '^model-arb\&gt;'
         syn keyword rubyRailsARMethod default_scope named_scope serialize
-        syn keyword rubyRailsARAssociationMethod belongs_to has_one has_many has_and_belongs_to_many composed_of
+        syn keyword rubyRailsARAssociationMethod belongs_to has_one has_many has_and_belongs_to_many composed_of accepts_nested_attributes_for
         syn keyword rubyRailsARCallbackMethod before_create before_destroy before_save before_update before_validation before_validation_on_create before_validation_on_update
         syn keyword rubyRailsARCallbackMethod after_create after_destroy after_save after_update after_validation after_validation_on_create after_validation_on_update
         syn keyword rubyRailsARClassMethod attr_accessible attr_protected establish_connection set_inheritance_column set_locking_column set_primary_key set_sequence_name set_table_name
@@ -3253,8 +3339,9 @@ function! s:BufSyntax()
           syn keyword rubyRailsTestControllerMethod assert_response assert_redirected_to assert_template assert_recognizes assert_generates assert_routing assert_dom_equal assert_dom_not_equal assert_select assert_select_rjs assert_select_encoded assert_select_email assert_tag assert_no_tag
         endif
       elseif t=~ '^spec\&gt;'
-        syn keyword rubyRailsTestMethod describe context it specify it_should_behave_like before after fixtures controller_name helper_name
-        syn keyword rubyRailsTestMethod violated pending
+        syn keyword rubyRailsTestMethod describe context it specify it_should_behave_like before after subject fixtures controller_name helper_name
+        syn keyword rubyRailsTestMethod violated pending mock mock_model stub_model
+        syn match rubyRailsTestMethod '\.\@&lt;!\&lt;stub\&gt;!\@!'
         if t !~ '^spec-model\&gt;'
           syn match   rubyRailsTestControllerMethod  '\.\@&lt;!\&lt;\%(get\|post\|put\|delete\|head\|process\|assigns\)\&gt;'
           syn keyword rubyRailsTestControllerMethod  integrate_views
@@ -4289,10 +4376,10 @@ function! s:SetBasePath()
   if s:controller() != ''
     let path += ['app/views/'.s:controller(), 'public']
   endif
-  if rails#app().test_suites('test')
+  if rails#app().has('test')
     let path += ['test', 'test/unit', 'test/functional', 'test/integration']
   endif
-  if rails#app().test_suites('spec')
+  if rails#app().has('spec')
     let path += ['spec', 'spec/models', 'spec/controllers', 'spec/helpers', 'spec/views', 'spec/lib']
   endif
   let path += ['app/*', 'vendor', 'vendor/plugins/*/lib', 'vendor/plugins/*/test', 'vendor/rails/*/lib', 'vendor/rails/*/test']</diff>
      <filename>autoload/rails.vim</filename>
    </modified>
    <modified>
      <diff>@@ -211,6 +211,7 @@ x.......Close the current nodes parent...........................|NERDTree-x|
 X.......Recursively close all children of the current node.......|NERDTree-X|
 e.......Edit the current dif.....................................|NERDTree-e|
 
+&lt;CR&gt;...............same as |NERDTree-o|.
 double-click.......same as the |NERDTree-o| map.
 middle-click.......same as |NERDTree-i| for files, same as
                    |NERDTree-e| for dirs.
@@ -221,8 +222,8 @@ P.......Jump to the root node....................................|NERDTree-P|
 p.......Jump to current nodes parent.............................|NERDTree-p|
 K.......Jump up inside directories at the current tree depth.....|NERDTree-K|
 J.......Jump down inside directories at the current tree depth...|NERDTree-J|
-&lt;C-j&gt;...Jump down to the next sibling of the current directory...|NERDTree-c-j|
-&lt;C-k&gt;...Jump up to the previous sibling of the current directory.|NERDTree-c-k|
+&lt;C-J&gt;...Jump down to the next sibling of the current directory...|NERDTree-C-J|
+&lt;C-K&gt;...Jump up to the previous sibling of the current directory.|NERDTree-C-K|
 
 C.......Change the tree root to the selected dir.................|NERDTree-C|
 u.......Move the tree root up one directory......................|NERDTree-u|
@@ -430,16 +431,16 @@ If the cursor is already on the last node then do the following:
     * go to the last child of that node
 
 ------------------------------------------------------------------------------
-                                                                *NERDTree-c-j*
-Default key: &lt;C-j&gt;
+                                                                *NERDTree-C-J*
+Default key: &lt;C-J&gt;
 Map option: NERDTreeMapJumpNextSibling
 Applies to: files and directories.
 
 Jump to the next sibling of the selected node.
 
 ------------------------------------------------------------------------------
-                                                                *NERDTree-c-k*
-Default key: &lt;C-k&gt;
+                                                                *NERDTree-C-K*
+Default key: &lt;C-K&gt;
 Map option: NERDTreeMapJumpPrevSibling
 Applies to: files and directories.
 
@@ -498,6 +499,14 @@ Applies to: files and directories.
 Display the filesystem menu. See |NERDTreeFilesysMenu| for details.
 
 ------------------------------------------------------------------------------
+                                                                 *NERDTree-cd*
+Default key: cd
+Map option: NERDTreeMapChdir
+Applies to: files and directories.
+
+Change vims current working directory to that of the selected node.
+
+------------------------------------------------------------------------------
                                                                   *NERDTree-I*
 Default key: I
 Map option: NERDTreeMapToggleHidden
@@ -679,7 +688,7 @@ If set to 1, the NERD tree window will center around the cursor if it moves to
 within |'NERDTreeAutoCenterThreshold'| lines of the top/bottom of the window.
 
 This is ONLY done in response to tree navigation mappings,
-i.e. |NERDTree-J| |NERDTree-K| |NERDTree-C-J| |NERDTree-c-K| |NERDTree-p|
+i.e. |NERDTree-J| |NERDTree-K| |NERDTree-C-J| |NERDTree-C-K| |NERDTree-p|
 |NERDTree-P|
 
 The centering is done with a |zz| operation.
@@ -742,7 +751,7 @@ Values: 0 or 1.
 Default: 1.
 
 If set to 1, the current cursor line in the NERD tree buffer will be
-highlighted. This is done using the |cursorline| option.
+highlighted. This is done using the |'cursorline'| option.
 
 ------------------------------------------------------------------------------
                                                        *'NERDTreeHijackNetrw'*
@@ -988,6 +997,15 @@ The latest dev versions are on github
 ==============================================================================
 6. Changelog                                               *NERDTreeChangelog*
 
+3.1.1
+    - fix a bug where a non-listed no-name buffer was getting created every
+      time the tree windows was created, thanks to Derek Wyatt and owen1
+    - make &lt;CR&gt; behave the same as the 'o' mapping
+    - some helptag fixes in the doc, thanks strull
+    - fix a bug when using :set nohidden and opening a file where the previous
+      buf was modified. Thanks iElectric
+    - other minor fixes
+
 3.1.0
     New features:
     - add mappings to open files in a vsplit, see :help NERDTree-s and :help</diff>
      <filename>doc/NERD_tree.txt</filename>
    </modified>
    <modified>
      <diff>@@ -80,9 +80,9 @@ Rails application development.
    |rails-refactoring|
 
 8. Integration with other plugins.  |:Rproject| creates a new project.vim
-   project.  |:Rdbext| loads database settings from database.yml for dbext.vim
-   (and this happens by default under most circumstances).  Cream users get
-   some additional mappings, and all GUI users get a menu. |rails-integration|
+   project or spawns NERDTree.  If dbext.vim is installed, it will be
+   transparently configured to reflect database.yml.  Cream users get some
+   additional mappings, and all GUI users get a menu. |rails-integration|
 
 ==============================================================================
 INSTALLATION AND USAGE				*rails-installation*
@@ -149,7 +149,9 @@ actually edit a file from a Rails application.
 						*rails-:Rake!*
 :[range]Rake! {targets}	Called with a bang, :Rake will use an alternate
 			'errorformat' which attempts to parse the full stack
-			backtrace.
+			backtrace.  For purely informative rake tasks (stats,
+			routes, notes, etc), the preview pane is opened with
+			the full output of the command.
 
 						*rails-:Rcd*
 :Rcd [{directory}]	|:cd| to /path/to/railsapp/{directory}.
@@ -202,7 +204,8 @@ actually edit a file from a Rails application.
 						*rails-:Rtags*
 :Rtags			Calls ctags -R on the current application root and
 			writes the result to tmp/tags.  Exuberant ctags must
-			be installed.
+			be installed.  Additional arguments can be passed to
+			ctags with |g:rails_ctags_arguments|.
 
 						*rails-:Rrefresh*
 :Rrefresh		Refreshes certain cached settings.  Most noticeably,
@@ -449,8 +452,9 @@ The following commands are not clearly associated with models or controllers.
 :Rplugin					|rails-:Rplugin|
 :Rlib						|rails-:Rlib|
 :Rtask						|rails-:Rtask|
-:Renvironment                                   |rails-:Renvironment|
-:Rinitializer                                   |rails-:Rinitializer|
+:Rmetal						|rails-:Rmetal|
+:Renvironment					|rails-:Renvironment|
+:Rinitializer					|rails-:Rinitializer|
 :Rintegrationtest				|rails-:Rintegrationtest|
 :Rspec						|rails-:Rspec|
 
@@ -481,6 +485,10 @@ The following commands are not clearly associated with models or controllers.
 			argument is given, either the current plugin's
 			Rakefile or the application Rakefile will be edited.
 
+						*rails-:Rmetal*
+:Rmetal [{name}]	Edit the app/metal file specified.  With no argument,
+			defaults to editing config/boot.rb.
+
 						*rails-:Renvironment*
 :Renvironment [{name}]  Edit the config/environments file specified.  With no
 			argument, defaults to editing config/environment.rb.
@@ -491,8 +499,9 @@ The following commands are not clearly associated with models or controllers.
 
 						*rails-:Rintegrationtest*
 :Rintegrationtest [{name}]
-			Edit the integration test specified.  With no
-			argument, defaults to editing test/test_helper.rb.
+			Edit the integration test or cucumber feature
+			specified.  With no argument, defaults to editing
+			test/test_helper.rb.
 
 						*rails-:Rspec*
 :Rspec [{name}]		Edit the given spec.  With no argument, defaults to
@@ -1036,6 +1045,12 @@ like table name completion and commands like &gt;
 Note that dbext is a complicated plugin, and may require additional
 configuration.  See |dbext| (if installed) and |sql-completion-dynamic|.
 
+						*g:rails_ctags_arguments*  &gt;
+	let g:rails_ctags_arguments='--exclude=&quot;*.js&quot;'
+Additional arguments to pass to ctags from |:Rtags|.  Defaults to
+'--exclude=facebox.js --exclude=&quot;*.*.js&quot;', which attempts to ignore jQuery
+plugins that can choke up ctags.
+
 						*g:rails_default_file*  &gt;
 	let g:rails_default_file='config/database.yml'
 File to load when a new Rails application is created, or when loading an</diff>
      <filename>doc/rails.txt</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@
 &quot; File:        NERD_tree.vim
 &quot; Description: vim global plugin that provides a nice tree explorer
 &quot; Maintainer:  Martin Grenfell &lt;martin_grenfell at msn dot com&gt;
-&quot; Last Change: 27 Jan, 2009
+&quot; Last Change: 7 Jun, 2009
 &quot; License:     This program is free software. It comes without any warranty,
 &quot;              to the extent permitted by applicable law. You can redistribute
 &quot;              it and/or modify it under the terms of the Do What The Fuck You
@@ -10,7 +10,7 @@
 &quot;              See http://sam.zoy.org/wtfpl/COPYING for more details.
 &quot;
 &quot; ============================================================================
-let s:NERD_tree_version = '3.1.0'
+let s:NERD_tree_version = '3.1.1'
 
 &quot; SECTION: Script init stuff {{{1
 &quot;============================================================
@@ -154,7 +154,7 @@ command! -n=? -complete=dir -bar NERDTree :call s:initNerdTree('&lt;args&gt;')
 command! -n=? -complete=dir -bar NERDTreeToggle :call s:toggle('&lt;args&gt;')
 command! -n=0 -bar NERDTreeClose :call s:closeTreeIfOpen()
 command! -n=1 -complete=customlist,s:completeBookmarks -bar NERDTreeFromBookmark call s:initNerdTree('&lt;args&gt;')
-command! -n=0 -complete=customlist,s:completeNERDTreeMirrors -bar NERDTreeMirror call s:initNerdTreeMirror()
+command! -n=0 -bar NERDTreeMirror call s:initNerdTreeMirror()
 &quot; SECTION: Auto commands {{{1
 &quot;============================================================
 augroup NERDTree
@@ -796,12 +796,12 @@ function! s:TreeFileNode.open()
         call s:exec(winnr . &quot;wincmd w&quot;)
 
     else
-        if !s:isWindowUsable(winnr(&quot;#&quot;)) &amp;&amp; s:firstNormalWindow() ==# -1
+        if !s:isWindowUsable(winnr(&quot;#&quot;)) &amp;&amp; s:firstUsableWindow() ==# -1
             call self.openSplit()
         else
             try
                 if !s:isWindowUsable(winnr(&quot;#&quot;))
-                    call s:exec(s:firstNormalWindow() . &quot;wincmd w&quot;)
+                    call s:exec(s:firstUsableWindow() . &quot;wincmd w&quot;)
                 else
                     call s:exec('wincmd p')
                 endif
@@ -2355,12 +2355,13 @@ function! s:createTreeWin()
     &quot;create the nerd tree window
     let splitLocation = g:NERDTreeWinPos ==# &quot;left&quot; ? &quot;topleft &quot; : &quot;botright &quot;
     let splitSize = g:NERDTreeWinSize
-    silent! exec splitLocation . 'vertical ' . splitSize . ' new'
 
     if !exists('t:NERDTreeBufName')
         let t:NERDTreeBufName = s:nextBufferName()
+        silent! exec splitLocation . 'vertical ' . splitSize . ' new'
         silent! exec &quot;edit &quot; . t:NERDTreeBufName
     else
+        silent! exec splitLocation . 'vertical ' . splitSize . ' split'
         silent! exec &quot;buffer &quot; . t:NERDTreeBufName
     endif
 
@@ -2404,6 +2405,7 @@ function! s:dumpHelp()
         let @h=@h.&quot;\&quot; ============================\n&quot;
         let @h=@h.&quot;\&quot; File node mappings~\n&quot;
         let @h=@h.&quot;\&quot; &quot;. (g:NERDTreeMouseMode ==# 3 ? &quot;single&quot; : &quot;double&quot;) .&quot;-click,\n&quot;
+        let @h=@h.&quot;\&quot; &lt;CR&gt;,\n&quot;
         if b:NERDTreeType ==# &quot;primary&quot;
             let @h=@h.&quot;\&quot; &quot;. g:NERDTreeMapActivateNode .&quot;: open in prev window\n&quot;
         else
@@ -2516,14 +2518,15 @@ function! s:echoError(msg)
     call s:echo(a:msg)
     echohl normal
 endfunction
-&quot;FUNCTION: s:firstNormalWindow(){{{2
+&quot;FUNCTION: s:firstUsableWindow(){{{2
 &quot;find the window number of the first normal window
-function! s:firstNormalWindow()
+function! s:firstUsableWindow()
     let i = 1
     while i &lt;= winnr(&quot;$&quot;)
         let bnum = winbufnr(i)
         if bnum != -1 &amp;&amp; getbufvar(bnum, '&amp;buftype') ==# ''
                     \ &amp;&amp; !getwinvar(i, '&amp;previewwindow')
+                    \ &amp;&amp; (!getbufvar(bnum, '&amp;modified') || &amp;hidden)
             return i
         endif
 
@@ -2630,8 +2633,8 @@ function! s:isTreeOpen()
     return s:getTreeWinNum() != -1
 endfunction
 &quot;FUNCTION: s:isWindowUsable(winnumber) {{{2
-&quot;Returns 1 if opening a file from the tree in the given window requires it to
-&quot;be split
+&quot;Returns 0 if opening a file from the tree in the given window requires it to
+&quot;be split, 1 otherwise
 &quot;
 &quot;Args:
 &quot;winnumber: the number of the window in question
@@ -3042,7 +3045,8 @@ function! s:activateNode(forceKeepWindowOpen)
                 call bookmark.toRoot()
             else
                 if bookmark.validate()
-                    call (s:TreeFileNode.New(bookmark.path)).open()
+                    let n = s:TreeFileNode.New(bookmark.path)
+                    call n.open()
                 endif
             endif
         endif
@@ -3058,6 +3062,7 @@ function! s:bindMappings()
 
     exec &quot;nnoremap &lt;silent&gt; &lt;buffer&gt; &quot;. g:NERDTreeMapActivateNode . &quot; :call &lt;SID&gt;activateNode(0)&lt;cr&gt;&quot;
     exec &quot;nnoremap &lt;silent&gt; &lt;buffer&gt; &quot;. g:NERDTreeMapOpenSplit .&quot; :call &lt;SID&gt;openEntrySplit(0,0)&lt;cr&gt;&quot;
+    exec &quot;nnoremap &lt;silent&gt; &lt;buffer&gt; &lt;cr&gt; :call &lt;SID&gt;activateNode(0)&lt;cr&gt;&quot;
 
     exec &quot;nnoremap &lt;silent&gt; &lt;buffer&gt; &quot;. g:NERDTreeMapPreview .&quot; :call &lt;SID&gt;previewNode(0)&lt;cr&gt;&quot;
     exec &quot;nnoremap &lt;silent&gt; &lt;buffer&gt; &quot;. g:NERDTreeMapPreviewSplit .&quot; :call &lt;SID&gt;previewNode(1)&lt;cr&gt;&quot;</diff>
      <filename>plugin/NERD_tree.vim</filename>
    </modified>
    <modified>
      <diff>@@ -70,6 +70,7 @@ call s:SetOptDefault(&quot;rails_statusline&quot;,1)
 call s:SetOptDefault(&quot;rails_syntax&quot;,1)
 call s:SetOptDefault(&quot;rails_mappings&quot;,1)
 call s:SetOptDefault(&quot;rails_abbreviations&quot;,1)
+call s:SetOptDefault(&quot;rails_ctags_arguments&quot;,&quot;--exclude=facebox.js --exclude=\&quot;*.*.js\&quot;&quot;)
 call s:SetOptDefault(&quot;rails_expensive&quot;,1)
 call s:SetOptDefault(&quot;rails_dbext&quot;,g:rails_expensive)
 call s:SetOptDefault(&quot;rails_default_file&quot;,&quot;README&quot;)</diff>
      <filename>plugin/rails.vim</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2d27bb34a91d25f7ee9826ed0a7f2a2045ff5a4c</id>
    </parent>
  </parents>
  <author>
    <name>Luiz Rocha</name>
    <email>lsdrocha@gmail.com</email>
  </author>
  <url>http://github.com/lsdr/vim-folder/commit/1c04f62c66304a864c7381621ca2c3e5b6dab006</url>
  <id>1c04f62c66304a864c7381621ca2c3e5b6dab006</id>
  <committed-date>2009-06-09T05:51:45-07:00</committed-date>
  <authored-date>2009-06-09T05:51:45-07:00</authored-date>
  <message>updating NERD_tree and rails.vim plugins</message>
  <tree>f0619f7f2576087669b3ca2711973d404d7442db</tree>
  <committer>
    <name>Luiz Rocha</name>
    <email>lsdrocha@gmail.com</email>
  </committer>
</commit>
