Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Ctags-like tag generator for CoffeeScript

README.md

CoffeeTags

Latest version: 0.1.3

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

Build Status

Watch a quick demo

Example + Screenshot

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

1. CoffeeTags:1:vim -
Uploaded with Skitch!

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

  • ruby (1.8.7, 1.9.2 or 1.9.3)

Editors supported

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 welcomed

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

Bitdeli Badge

Something went wrong with that request. Please try again.