Skip to content

Instantly share code, notes, and snippets.

@fgeller
Last active October 23, 2016 23:53
Show Gist options
  • Save fgeller/8452095 to your computer and use it in GitHub Desktop.
Save fgeller/8452095 to your computer and use it in GitHub Desktop.
ctags regexs for scala
--langdef=Scala
--langmap=Scala:.scala
--regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*(private|protected)?[ \t]*class[ \t]+([a-zA-Z0-9_]+)/\4/c,classes/
--regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*(private|protected)?[ \t]*object[ \t]+([a-zA-Z0-9_]+)/\4/c,objects/
--regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*(private|protected)?[ \t]*case class[ \t]+([a-zA-Z0-9_]+)/\4/c,classes/
--regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*(private|protected)?[ \t]*case object[ \t]+([a-zA-Z0-9_]+)/\4/c,objects/
--regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*(private|protected)?[ \t]*trait[ \t]+([a-zA-Z0-9_]+)/\4/t,traits/
--regex-scala=/^[ \t]*type[ \t]+([a-zA-Z0-9_]+)/\1/T,types/
--regex-scala=/^[ \t]*(override)?[ \t]*(private|protected)?[ \t]*((abstract|final|sealed|implicit|lazy)?[ \t]*)def[ \t]+([a-zA-Z0-9_]+)/\5/m,methods/
--regex-scala=/^[ \t]*(override)?[ \t]*(private|protected)?[ \t]*((abstract|final|sealed|implicit|lazy)?[ \t]*)val[ \t]+([a-zA-Z0-9_]+)/\5/l,constants/
--regex-scala=/^[ \t]*(override)?[ \t]*(private|protected)?[ \t]*((abstract|final|sealed|implicit|lazy)?[ \t]*)var[ \t]+([a-zA-Z0-9_]+)/\5/l,variables/
--regex-scala=/^[ \t]*package[ \t]+([a-zA-Z0-9_.]+)/\1/p,packages/
--exclude=target
--exclude=.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment