A simple tool for generating CoffeeScript tags (Ctags compatible).
Example + Screenshot
Showing only functions (right) or with variables included (left)
Uploaded with Skitch!
CoffeeTags was created for use with Vim and TagBar plugin, however it accepts most common ctags arguments, therefore the following:
coffeetags -R -f TAGS
will generate standard TAGS file which later can be used with Vim (standard
:tag command works as expected)
- ruby (either 1.8.7 or 1.9.2)
gem install CoffeeTags
add TagBar config to your .vimrc
coffeetags --vim-conf >> ~/.vimrc
CoffeeTags can work in 2 modes:
- tags only for functions (default)
- tags for functions and objects containing them
Second mode is activated by adding
--include-vars to command line arguments
CoffeeTags + TagBar + Vim
Config in vimrc
You can add the config to your .vimrc (making sure that the old one is removed) by:
--vim-conf >> ~/.vimrc
or (for 2nd mode)
coffeetags --include-vars --vim-conf >> ~/.vimrc
Config as a filetype plugin
You can generate a special filetype plugin and tagbar will use that automatically.
This option is preferable if you want to keep your vimrc short.
--vim-conf > ~/vim/ftplugin/coffee/tagbar-coffee.vim [--include-vars] --vim-conf > ~/vim/ftplugin/coffee/tagbar-coffee.vim
or if you're using pathogen
[--include-vars] --vim-conf > ~/vim/bundle//ftplugin/coffee/tagbar-coffee.vim --vim-conf > ~/vim/bundle//ftplugin/coffee/tagbar-coffee.vim
- open your coffeescript file and open TagBar.
- squash all bugs