Last active
October 16, 2019 13:33
-
-
Save chrisbarrett/5787201 to your computer and use it in GitHub Desktop.
Ruby code folding using hideshow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(eval-after-load "hideshow" | |
'(add-to-list 'hs-special-modes-alist | |
`(ruby-mode | |
,(rx (or "def" "class" "module" "{" "[")) ; Block start | |
,(rx (or "}" "]" "end")) ; Block end | |
,(rx (or "#" "=begin")) ; Comment start | |
ruby-forward-sexp nil))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks! o/