Skip to content

Commit

Permalink
Option to override ctags arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
tpope committed Mar 20, 2009
1 parent 8df9ad0 commit ff7c710
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion autoload/rails.vim
Expand Up @@ -852,7 +852,7 @@ function! s:app_tags_command() dict
else
return s:error("ctags not found")
endif
exe "!".cmd." -f ".s:escarg(self.path("tmp/tags"))." --exclude=facebox.js --exclude=\"*.*.js\" --langmap=\"ruby:+.rake.builder.rjs\" -R ".s:escarg(self.path())
exe '!'.cmd.' -f '.s:escarg(self.path("tmp/tags")).' -R --langmap="ruby:+.rake.builder.rjs" '.g:rails_ctags_arguments.' '.s:escarg(self.path())
endfunction

call s:add_methods('app',['tags_command'])
Expand Down
9 changes: 8 additions & 1 deletion doc/rails.txt
Expand Up @@ -204,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,
Expand Down Expand Up @@ -1044,6 +1045,12 @@ like table name completion and commands like >
Note that dbext is a complicated plugin, and may require additional
configuration. See |dbext| (if installed) and |sql-completion-dynamic|.

*g:rails_ctags_arguments* >
let g:rails_ctags_arguments='--exclude="*.js"'
Additional arguments to pass to ctags from |:Rtags|. Defaults to
'--exclude=facebox.js --exclude="*.*.js"', which attempts to ignore jQuery
plugins that can choke up ctags.

*g:rails_default_file* >
let g:rails_default_file='config/database.yml'
File to load when a new Rails application is created, or when loading an
Expand Down
1 change: 1 addition & 0 deletions plugin/rails.vim
Expand Up @@ -70,6 +70,7 @@ call s:SetOptDefault("rails_statusline",1)
call s:SetOptDefault("rails_syntax",1)
call s:SetOptDefault("rails_mappings",1)
call s:SetOptDefault("rails_abbreviations",1)
call s:SetOptDefault("rails_ctags_arguments","--exclude=facebox.js --exclude=\"*.*.js\"")
call s:SetOptDefault("rails_expensive",1)
call s:SetOptDefault("rails_dbext",g:rails_expensive)
call s:SetOptDefault("rails_default_file","README")
Expand Down

0 comments on commit ff7c710

Please sign in to comment.