Skip to content

Instantly share code, notes, and snippets.

@nic0-lab
Created August 4, 2017 07:05
Show Gist options
  • Save nic0-lab/b0377a4ea0c2dc0ba231ffbc2773b20b to your computer and use it in GitHub Desktop.
Save nic0-lab/b0377a4ea0c2dc0ba231ffbc2773b20b to your computer and use it in GitHub Desktop.
.ctags configuration
--languages=-JavaScript
--langdef=js
--langmap=js:.js
--regex-js=/^(var)?[ \t]*([A-Za-z0-9_$]*\.)*([A-Za-z0-9_$]+)[ \t]*=[ \t]*\[/\3/a,array/
--regex-js=/^(var)?[ \t]*([A-Za-z0-9_$]*\.)*([A-Za-z0-9_$]+)[ \t]*=[ \t]*\{/\3/o,object/
--regex-js=/^(var)?[ \t]*([A-Za-z0-9_$]*\.)*([A-Za-z0-9_$]+)[ \t]*=[^{\[]*$/\3/r,var/
--regex-js=/^var[ \t]+([A-Za-z0-9._$]+)[ \t]*=[ \t]*[A-Za-z0-9_$]+.extend/\1/f,function/
--regex-js=/^[ \t]*([A-Za-z0-9_$]*\.)*([A-Za-z0-9_$]+)[ \t]*[:=][ \t]*function/\2/f,function/
--regex-js=/^[ \t]*function[ \t]*([A-Za-z0-9_$]+)[ \t]*\(/\1/f,function/
--regex-js=/^[ \t]*var[ \t]+([A-Za-z0-9_$]*\.)*([A-Za-z0-9_$]+)[ \t]*=[ \t]function/\2/f,function/
--regex-js=/(jQuery|\$)\([ \t]*([^ \t]*)[ \t]*\)\.bind\([ \t]*['"](.*)['"]/\2.\3/f,function/
--regex-js=/^[ \t]*describe[ \t]*\([ \t]*["'](.*)["']/\1/f,function/
--regex-js=/^([ \t]*)(describe|context|it)[ \t]*\([ \t]*["'](.*)["']/.\1\3/f,function/
--langdef=coffee
--langmap=coffee:.coffee.cjsx
--regex-coffee=/(^|=[ \t])*class ([A-Za-z_][A-Za-z0-9_]*\.)*([A-Za-z_][A-Za-z0-9_]*)( extends ([A-Za-z][A-Za-z0-9_.]*)+)?$/\3/c,class/
--regex-coffee=/^[ \t]*(module\.)?(exports\.)?@?(([A-Za-z_][A-Za-z0-9_.]*)+):.*[-=]>.*$/\3/m,method/
--regex-coffee=/^[ \t]*([A-Za-z_][A-Za-z0-9_]*\.)*([A-Za-z_][A-Za-z0-9_]*)[ \t]*=.*[-=]>.*$/\2/f,function/
--regex-coffee=/^[ \t]*([A-Za-z_][A-Za-z0-9_]*\.)*([A-Za-z_][A-Za-z0-9_]*)[ \t]*=[^->]*$/\2/v,variable/
--regex-coffee=/^[ \t]*@(([A-Za-z_][A-Za-z0-9_.]*)+)[ \t]*=[^->\n]*$/\1/a,attribute/
--regex-coffee=/^[ \t]*@(([A-Za-z_][A-Za-z0-9_.]*)+):[^->\n]*$/\1/A,static attribute/
--regex-coffee=/^[ \t]*(([A-Za-z_][A-Za-z0-9_.]*)+):[^->\n]*$/\1/a,attribute/
--regex-coffee=/((constructor|initialize):[ \t]*\()@(([A-Za-z][A-Za-z0-9_.]*)+)([ \t]*=[ \t]*[^,)]+)?/\3/a,attribute/
--langdef=scss
--langmap=scss:.scss
--regex-scss=/^[ \t]*@mixin[ \t]+([A-Za-z0-9_]+)/\1/m,mixin/
--regex-scss=/^[ \t]*@function[ \t]+([A-Za-z0-9_]+)/\1/f,function/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment