Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
ctags definitions for Coffeescript. Very basic for now. "> ctags -e -R source_folder" and then M-. to jump to the definition of any function or variable (if you're using emacs)
# Detects classes, static/class methods, plain functions and variables.
--regex-coffee=/^class ([A-Za-z.]+)( extends [A-Za-z.]+)?$/\1/c,class/
--regex-coffee=/^[ \t]*@?([A-Za-z.]+):.*[-=]>.*$/\1/f,function/
--regex-coffee=/^[ \t]*([A-Za-z.]+)[ \t]+=.*[-=]>.*$/\1/f,function/
--regex-coffee=/^[ \t]*([A-Za-z.]+)[ \t]+=[^->\n]*$/\1/v,variable/

This comment has been minimized.

Copy link

bogdan commented Dec 13, 2011

Thanks a lot.

A needed wrap regexp with "" before I make it work


This comment has been minimized.

Copy link

rosenfeld commented Apr 17, 2012

You can also declare a class like this:

(export ? window).MyClass = class MyClass
constructor: ...

I mean, it doesn't need to start with "class":

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.