- starting init.el just basics (package, use-package, path-handlin) - include my-site-start.el that includes site-start.d directory and imports all *.el files in lexical order - functionality is imported via use-package inside the *.el file (first run: internet connection is needed to MELPA)
33 lines
982 B
EmacsLisp
33 lines
982 B
EmacsLisp
;;; 20-hs-minor-mode.el --- hide-show code folding
|
|
|
|
;;; Commentary:
|
|
;; Online Documentation can be found at
|
|
;; https://www.emacswiki.org/emacs/HideShow
|
|
|
|
;;; Code:
|
|
|
|
(load-library "hideshow")
|
|
(global-set-key (kbd "C-+") 'toggle-hiding)
|
|
(global-set-key (kbd "C-\\") 'toggle-selective-display)
|
|
|
|
;; activate on following major modes
|
|
(add-hook 'c-mode-common-hook 'hs-minor-mode)
|
|
(add-hook 'emacs-lisp-mode-hook 'hs-minor-mode)
|
|
(add-hook 'java-mode-hook 'hs-minor-mode)
|
|
(add-hook 'lisp-mode-hook 'hs-minor-mode)
|
|
(add-hook 'perl-mode-hook 'hs-minor-mode)
|
|
(add-hook 'sh-mode-hook 'hs-minor-mode)
|
|
(add-hook 'rust-mode-hook 'hs-minor-mode)
|
|
|
|
;; Hide the comments too when you do a 'hs-hide-all'
|
|
(setq hs-hide-comments nil)
|
|
|
|
;; Set whether isearch opens folded comments, code, or both
|
|
;; where x is code, comments, t (both), or nil (neither)
|
|
(setq hs-isearch-open 'code)
|
|
|
|
;; enable hs-minor-mode globaly
|
|
;; (hs-minor-mode 1)
|
|
|
|
;;; 20-hs-minor-mode.el ends here
|