201-hs-minor-mode: align category, update 'global-set key
* enable hs in rustic-mode * adapt global-set-key and introduce generic mappings Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
;;; 20-hs-minor-mode.el --- hide-show code folding
|
;;; 201-hs-minor-mode.el --- hide-show code folding
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;; Online Documentation can be found at
|
;; Online Documentation can be found at
|
||||||
@@ -7,8 +7,6 @@
|
|||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(load-library "hideshow")
|
(load-library "hideshow")
|
||||||
(global-set-key (kbd "C-+") 'toggle-hiding)
|
|
||||||
(global-set-key (kbd "C-\\") 'toggle-selective-display)
|
|
||||||
|
|
||||||
;; activate on following major modes
|
;; activate on following major modes
|
||||||
(add-hook 'c-mode-common-hook 'hs-minor-mode)
|
(add-hook 'c-mode-common-hook 'hs-minor-mode)
|
||||||
@@ -17,7 +15,7 @@
|
|||||||
(add-hook 'lisp-mode-hook 'hs-minor-mode)
|
(add-hook 'lisp-mode-hook 'hs-minor-mode)
|
||||||
(add-hook 'perl-mode-hook 'hs-minor-mode)
|
(add-hook 'perl-mode-hook 'hs-minor-mode)
|
||||||
(add-hook 'sh-mode-hook 'hs-minor-mode)
|
(add-hook 'sh-mode-hook 'hs-minor-mode)
|
||||||
(add-hook 'rust-mode-hook 'hs-minor-mode)
|
(add-hook 'rustic-mode-hook 'hs-minor-mode)
|
||||||
|
|
||||||
;; Hide the comments too when you do a 'hs-hide-all'
|
;; Hide the comments too when you do a 'hs-hide-all'
|
||||||
(setq hs-hide-comments nil)
|
(setq hs-hide-comments nil)
|
||||||
@@ -26,7 +24,11 @@
|
|||||||
;; where x is code, comments, t (both), or nil (neither)
|
;; where x is code, comments, t (both), or nil (neither)
|
||||||
(setq hs-isearch-open 'code)
|
(setq hs-isearch-open 'code)
|
||||||
|
|
||||||
|
(global-set-key (kbd "M-x h-mi") 'hs-minor-mode)
|
||||||
|
(global-set-key (kbd "C-+") 'toggle-hiding)
|
||||||
|
(global-set-key (kbd "C-\\") 'toggle-selective-display)
|
||||||
|
|
||||||
;; enable hs-minor-mode globaly
|
;; enable hs-minor-mode globaly
|
||||||
;; (hs-minor-mode 1)
|
;; (hs-minor-mode 1)
|
||||||
|
|
||||||
;;; 20-hs-minor-mode.el ends here
|
;;; 201-hs-minor-mode.el ends here
|
||||||
|
|||||||
Reference in New Issue
Block a user