Skip to content

jeffszusz/CoffeeTags

 
 

Repository files navigation

CoffeeTags

Latest version: 0.0.3

A simple tool for generating CoffeeScript tags (Ctags compatible).

Build Status

Example + Screenshot

Showing only functions (right) or with variables included (left)

<img src="http://img.skitch.com/20111012-8cjesum8ru8usqusra4yppj5cc.preview.png" alt="1. CoffeeTags:1:vim - "unicorn.local" (tmux)" />
Uploaded with Skitch!

Installation

You'll need to install Ruby if you haven't already, and use the Ruby package manager, gem:

sudo gem install CoffeeTags

Huh?

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)

Requirements

optional

Halp!

Just use coffeetags --help

Installation

  • get coffeetags

    gem install CoffeeTags

Vim installation

  • add TagBar config to your .vimrc

coffeetags --vim-conf >> ~/.vimrc

Sublime Text

TODO - I don't use ST myself, but PRs with HOWTO are welcome

Config types

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:

coffeetags --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.

coffeetags --vim-conf > ~/.vim/ftplugin/coffee/tagbar-coffee.vim
coffeetags [--include-vars] --vim-conf > ~/.vim/ftplugin/coffee/tagbar-coffee.vim

or if you're using pathogen

coffeetags [--include-vars] --vim-conf > ~/.vim/bundle/coffeetags/ftplugin/coffee/tagbar-coffee.vim
coffeetags --vim-conf > ~/.vim/bundle/coffeetags/ftplugin/coffee/tagbar-coffee.vim
  • open your coffeescript file and open TagBar.

Done!

TODO

  • squash all bugs

License

MIT

About

Ctags-like tag generator for CoffeeScript

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 83.7%
  • CoffeeScript 10.0%
  • JavaScript 5.6%
  • Perl 0.7%