Skip to content

Instantly share code, notes, and snippets.

@yury
Forked from AndrewRadev/Coffeescript ctags
Created May 6, 2012 22:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save yury/2624883 to your computer and use it in GitHub Desktop.
Save yury/2624883 to your computer and use it in GitHub Desktop.
ctags definitions for coffeescript. Detects classes, static/class methods, plain functions and variables.
--langdef=coffee
--langmap=coffee:.coffee
--regex-coffee=/(^|=[ \t])*class ([A-Za-z]+\.)*([A-Za-z]+)( extends [A-Za-z.]+)?$/\3/c,class/
--regex-coffee=/^[ \t]*(module\.)?(exports\.)?@?([A-Za-z.]+):.*[-=]>.*$/\3/f,function/
--regex-coffee=/^[ \t]*(module\.)?(exports\.)?([A-Za-z.]+)[ \t]+=.*[-=]>.*$/\3/f,function/
--regex-coffee=/^[ \t]*([A-Za-z.]+)[ \t]+=[^->\n]*$/\1/v,variable/
@bjornharrtell
Copy link

Hmm doesn't work for me. What does work for me in initial tests is several patterns and repeating one for multiple definitions passed in constructor... check out https://gist.github.com/2901844

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment