Skip to content

Instantly share code, notes, and snippets.

@chase
Forked from jesstelford/.ctags
Last active December 4, 2020 11:52
Show Gist options
  • Save chase/97f3b70799730295fd8f to your computer and use it in GitHub Desktop.
Save chase/97f3b70799730295fd8f to your computer and use it in GitHub Desktop.
# Detects classes, static/class methods, plain functions and variables.
# To use, place it in a ~/.ctags file.
--langdef=coffee
--langmap=coffee:.coffee
--regex-coffee=/^class ([A-Za-z.]+)( extends [A-Za-z.]+)?$/\1/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]*$/\3/v,variable/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment