forked from kaushalmodi/.emacs.d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup-indent-guide.el
36 lines (28 loc) · 1.16 KB
/
setup-indent-guide.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
;; Time-stamp: <2016-05-19 22:32:31 kmodi>
;; Indent Guide
;; https://github.com/zk-phi/indent-guide
(use-package indent-guide
:commands (modi/turn-on-indent-guide)
:config
(progn
(setq indent-guide-recursive t)
(setq indent-guide-char "|")
(defvar modi/indent-guide-mode-hooks '(verilog-mode-hook
emacs-lisp-mode-hook
python-mode-hook
sh-mode-hook
cperl-mode-hook)
"List of hooks of major modes in which indent-guide-mode should be enabled.")
(defun modi/turn-on-indent-guide ()
"Turn on indent-guide-mode only for specific modes."
(interactive)
(dolist (hook modi/indent-guide-mode-hooks)
(add-hook hook #'indent-guide-mode)))
(defun modi/turn-off-indent-guide ()
"Turn off indent-guide-mode only for specific modes."
(interactive)
(indent-guide-global-mode -1)
(dolist (hook modi/indent-guide-mode-hooks)
(remove-hook hook #'indent-guide-mode)))
(indent-guide-global-mode -1)))
(provide 'setup-indent-guide)