Last Updated: February 25, 2016
·
1.587K
· jm2dev

Collapse and expand scala code in emacs

Activate hide-show minor mode

M+x hs-minor-mode

Go to the first line of the block you want to collapse, like a method definition, a curly brace, etc, and type

C+c @ C+c

See http://emacswiki.org/emacs/HideShow for futher reading

In emacs terminology M (META) stands for ESC or ALT, while C for CTRL, so the sequence are:

  • "escape", "x" and type "hs-minor-mode"
  • "control", "c", "@", "control" and "c"