emacs.d: initial config version
- 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)
This commit is contained in:
32
site-start.d/201-hs-minor-mode.el
Normal file
32
site-start.d/201-hs-minor-mode.el
Normal file
@@ -0,0 +1,32 @@
|
||||
;;; 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
|
||||
Reference in New Issue
Block a user