Skip to content

Instantly share code, notes, and snippets.

@tsdeng
Created January 16, 2014 06:43
Show Gist options
  • Save tsdeng/8450756 to your computer and use it in GitHub Desktop.
Save tsdeng/8450756 to your computer and use it in GitHub Desktop.
scala emacs
--langdef=Scala
--langmap=Scala:.scala
--regex-Scala=/^[ \t]*class[ \t]*([a-zA-Z0-9_]+)/class \1/c,classes/
--regex-Scala=/^[ \t]*object[ \t]*([a-zA-Z0-9_]+)/object \1/o,objects/
--regex-scala=/^[ \t]*trait[ \t]*([a-zA-Z0-9_]+)/trait \1/t,traits/
--regex-Scala=/^[ \t]*case[ \t]*class[ \t]*([a-zA-Z0-9_]+)/case class \1/m,case-classes/
--regex-Scala=/^[ \t]*abstract[ \t]*class[ \t]*([a-zA-Z0-9_]+)/abstact class \1/a,abstract-classes/
--regex-Scala=/^[^\*\/]*def[ \t]*([a-zA-Z0-9_]+)[ \t]*.*[:=]/f \1/f,functions/
#--regex-Scala=/^[^\*\/]*val[ \t]*([a-zA-Z0-9_]+)[ \t]*[:=]/\1/V,values/
#--regex-Scala=/^[^\*\/]*var[ \t]*([a-zA-Z0-9_]+)[ \t]*[:=]/\1/v,variables/
#--regex-Scala=/^[^\*\/]*type[ \t]*([a-zA-Z0-9_]+)[ \t]*[\[<>=]/\1/T,types/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment