Created
March 18, 2016 11:40
-
-
Save littlemove/5c55dfe0bb724f4420c0 to your computer and use it in GitHub Desktop.
Revisions
-
littlemove created this gist
Mar 18, 2016 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ ;; Code folding (add-hook 'ruby-mode-hook (lambda () (hs-minor-mode))) (eval-after-load "hideshow" '(add-to-list 'hs-special-modes-alist `(ruby-mode ,(rx (or "def" "class" "module" "do" "{" "[")) ; Block start ,(rx (or "}" "]" "end")) ; Block end ,(rx (or "#" "=begin")) ; Comment start ruby-forward-sexp nil))) (global-set-key (kbd "C-c h <left>") 'hs-hide-block) (global-set-key (kbd "C-c h <right>") 'hs-show-block) (global-set-key (kbd "C-c h <up>") 'hs-hide-level)