Skip to content

Instantly share code, notes, and snippets.

@ScrapCodes
Last active November 10, 2016 16:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save ScrapCodes/5494834 to your computer and use it in GitHub Desktop.
Save ScrapCodes/5494834 to your computer and use it in GitHub Desktop.
file for etags --regex@${file} to generate scala tags.
find -name '*scala' -type f -exec etags --regex=@scala.etags {} +
/[^\*\/]*class[ \t]*\([a-zA-Z0-9_]+\)/\1/
/[^\*\/]*object[ \t]*\([a-zA-Z0-9_]+\)/\1/
/[^\*\/]*trait[ \t]*\([a-zA-Z0-9_]+\)/\1/
/[^\*\/]*case[ \t]*class[ \t]*\([a-zA-Z0-9_]+\)/\1/
/[^\*\/]*abstract[ \t]*class[ \t]*\([a-zA-Z0-9_]+\)/\1/
/[^\*\/]*def[ \t]*\([^[ \a\b\d\e\f\n\r\t\v(]+\)[ \t]*.*[:=]/\1/
/[^\*\/]*val[ \t]*\([a-zA-Z0-9_]+\)[ \t]*[:=]/\1/
/[^\*\/]*var[ \t]*\([a-zA-Z0-9_]+\)[ \t]*[:=]/\1/
/[^\*\/]*type[ \t]*\([a-zA-Z0-9_]+\)[ \t]*[\[<>=]/\1/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment