Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@chrisbarrett
Last active October 16, 2019 13:33
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisbarrett/5787201 to your computer and use it in GitHub Desktop.
Save chrisbarrett/5787201 to your computer and use it in GitHub Desktop.
Ruby code folding using hideshow
(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)))
@scudelletti
Copy link

Thanks! o/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment