Skip to content

Instantly share code, notes, and snippets.

@ebta
Created February 2, 2013 00:16
Show Gist options
  • Save ebta/4695124 to your computer and use it in GitHub Desktop.
Save ebta/4695124 to your computer and use it in GitHub Desktop.
Extended ctags regex for javascript, css language. Used mainly in my TagsView plugins for Notepad++ ( can be used for another ctags editor based). Still early development
--langdef=js
--langmap=js:.js
--regex-js=/([A-Za-z0-9._$()]+)[ \t]*[=][ \t]*function[ \t]*\(/\1/,function/
--regex-js=/function[ \t]+([A-Za-z0-9._$]+)[ \t]*\(([^)])\)/\1/,function/
--regex-js=/(var)*[ \t]+(\w+)[ \t]+=/\2/,var/
--langdef=css
--langmap=css:.css
--regex-css=/^[ \t]*\.([A-Za-z0-9_-]+)/.\1/c,class,classes/
--regex-css=/^[ \t]*#([A-Za-z0-9_-]+)/#\1/i,id,ids/
--regex-css=/^[ \t]*(([A-Za-z0-9_-]+[ \t\n,]+)+)\{/\1/t,tag,tags/
--regex-css=/^[ \t]*@media\s+([A-Za-z0-9_-]+)/\1/m,media,medias/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment