CTags Sublime Text 2 Plugin with autocompletion love. This plugin autocompletes from all open tabs and from .tags file.
Install good ctags:
brew install ctags
brew link ctags
Install gawk
brew install gawk
Clone to Packages
Note: remove CTags package from Package Control if you have it installed.
rm -rf ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/CTags
git clone https://github.com/yury/CTags ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/CTags
Command | Key Binding | Mouse Binding |
---|---|---|
rebuild_ctags | ctrl+shift+r | |
navigate_to_definition | cmd+> | ctrl+shift+click |
jump_back | cmd+< | |
show_symbols | alt+s |
Drop this to ~/.tags or this for better class detection
See Greg Sexton ctags regex
Add this rake task to your Rakefile
desc "Generate ctags for sublime"
task :tags do
config = App.config
files = config.bridgesupport_files + config.vendor_projects.map { |p| Dir.glob(File.join(p.path, '*.bridgesupport')) }.flatten
files += Dir.glob(config.project_dir + "/app/**/*").flatten
files += Dir.glob(config.project_dir + "/spec/**/*").flatten
tags_config = File.join(config.motiondir, 'data', 'bridgesupport-ctags.cfg')
sh "ctags --options=\"#{tags_config}\" -f .tags #{files.map { |x| '"' + x + '"' }.join(' ')}"
end
Do not forget to add .tags and .tags_sorted_by_file to your .gitignore file