Skip to content

Instantly share code, notes, and snippets.

@datanoise
Created December 21, 2011 03:50
Show Gist options
  • Save datanoise/1504477 to your computer and use it in GitHub Desktop.
Save datanoise/1504477 to your computer and use it in GitHub Desktop.
ctags for javascript
--langdef=js
--langmap=js:.js
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*function[ \t]*\(/\5/f,function/
--regex-js=/(^[^ \t]*\.|^)([A-Za-z0-9_$]+)[ \t]*=[^{]*{$/\2/c,class/
--regex-js=/@class[ \t]*(([a-zA-Z0-9_$]+\.)+([a-zA-Z0-9_$]+))/\3/c,class/
--regex-js=/@class[ \t]*([a-zA-Z0-9_$]+)([ \t]|$)/\1/c,class/
--regex-js=/function[ \t]+([A-Za-z0-9_$]+)[ \t]*\([^)]*\)/\1/f,function/
--regex-js=/(,|^)[ \t]*([A-Za-z_$][A-Za-z0-9_$]+)[ \t]*:[ \t]*function[ \t]*\(/\2/f,function/
--regex-js=/^[ \t]*([A-Za-z_$]+):[ \t]*([^f \t]|f[^u])/\1/p,property/
--regex-js=/@cfg[ \t]+(\{.+\})?[ \t]*([A-Za-z0-9_$]+)/\2/p,property/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment