Skip to content

Instantly share code, notes, and snippets.

@tim-smart
Created October 1, 2010 00:12
Show Gist options
  • Save tim-smart/605530 to your computer and use it in GitHub Desktop.
Save tim-smart/605530 to your computer and use it in GitHub Desktop.

Revisions

  1. tim-smart created this gist Oct 1, 2010.
    9 changes: 9 additions & 0 deletions ctags-js-basic
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    --langdef=js
    --langmap=js:.js
    --regex-js=/([A-Za-z0-9_$]+)[ \t]*[:=][ \t]*\{/\1/,object/
    --regex-js=/([A-Za-z0-9_$]+)[ \t]*[:=][ \t]*function[A-Za-z0-9_$ \t]*\(/\1/,function/
    --regex-js=/function[ \t]+([A-Za-z0-9_$]+)[ \t]*([^)])/\1/,function/
    --regex-js=/([A-Za-z0-9_$]+)[ \t]*[:=][ \t]*\[/\1/,array/
    --regex-js=/([A-Za-z0-9_$]+)[ \t]*[:=][ \t]*[^"]'[^']*/\1/,string/
    --regex-js=/([A-Za-z0-9_$]+)[ \t]*[:=][ \t]*[^']"[^"]*/\1/,string/
    --regex-js=/([A-Za-z0-9_$]+)[ \t]*[:=][ \t]*[0-9]+/\1/,number/