File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -78,9 +78,9 @@ endfunction
7878
7979augroup railsPluginDetect
8080 autocmd !
81- autocmd BufNewFile ,BufRead * call s: Detect (expand (" <afile>:p" ))
8281 autocmd VimEnter * if expand (" <amatch>" ) == " " && ! exists (" b:rails_root" ) | call s: Detect (getcwd ()) | endif | if exists (" b:rails_root" ) | silent doau User BufEnterRails | endif
83- autocmd FileType netrw if ! exists (" b:rails_root" ) | call s: Detect (expand (" %:p" )) | endif | if exists (" b:rails_root" ) | silent doau User BufEnterRails | endif
82+ autocmd BufNewFile ,BufRead * if empty (&filetype ) | call s: Detect (expand (" <afile>:p" )) | endif
83+ autocmd FileType * if ! exists (" b:rails_root" ) | call s: Detect (expand (" %:p" )) | endif | if exists (" b:rails_root" ) | silent doau User BufEnterRails | endif
8484 autocmd BufEnter * if exists (" b:rails_root" )|silent doau User BufEnterRails|endif
8585 autocmd BufLeave * if exists (" b:rails_root" )|silent doau User BufLeaveRails|endif
8686 autocmd Syntax railslog if s: autoload ()|call rails#log_syntax ()|endif
You can’t perform that action at this time.
0 commit comments