File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -1073,7 +1073,7 @@ function! rails#new_app_command(bang,...) abort
10731073 return ' '
10741074endfunction
10751075
1076- function ! s: app_tags_command () dict
1076+ function ! s: app_tags_command () dict abort
10771077 if exists (" g:Tlist_Ctags_Cmd" )
10781078 let cmd = g: Tlist_Ctags_Cmd
10791079 elseif executable (" exuberant-ctags" )
@@ -1090,8 +1090,19 @@ function! s:app_tags_command() dict
10901090 call s: error (" ctags not found" )
10911091 return ' '
10921092 endif
1093- let args = s: split (get (g: , ' rails_ctags_arguments' , ' --languages=ruby' ))
1094- exe ' !' .cmd.' -f ' .s: escarg (self .path (" tags" )).' -R ' .join (args ,' ' ).' ' .s: escarg (self .path ())
1093+ let cd = exists (' *haslocaldir' ) && haslocaldir () ? ' lcd' : ' cd'
1094+ let cwd = getcwd ()
1095+ try
1096+ execute cd fnameescape (self .path ())
1097+ if self .has_path (' .ctags' )
1098+ let args = []
1099+ else
1100+ let args = s: split (get (g: , ' rails_ctags_arguments' , ' --languages=ruby' ))
1101+ endif
1102+ exe ' !' .cmd.' -f ' .s: escarg (self .path (" tags" )).' -R ' .join (args ,' ' )
1103+ finally
1104+ execute cd fnameescape (cwd)
1105+ endtry
10951106 return ' '
10961107endfunction
10971108
Original file line number Diff line number Diff line change @@ -849,6 +849,9 @@ Ruby files.
849849>
850850 let g:rails_ctags_arguments = ['--languages=ruby']
851851<
852+ This option is ignored if a ctags configuration file named .ctags is found in
853+ the root of the project.
854+
852855 *g:rails_projections* >
853856 Defines the set of globally available projections. See | rails-projections | .
854857Where possible, it is generally advisable to use | g:rails_gem_projections | or
You can’t perform that action at this time.
0 commit comments