show vertical lines to guide indentation
Current block only
Require this script
and call command “M-x indent-guide-mode”.
If you want to enable indent-guide-mode in all buffers, call function indent-guide-global-mode.
Column lines are propertized with “indent-guide-face”. So you may configure this face to make liens more pretty in your colorscheme.
(set-face-background 'indent-guide-face "dimgray")
If you want indent-guide to show guide lines only in idle-time, you can set delay.
(setq indent-guide-delay 0.1)
To show not only one guide line but all guide lines recursively, set “indent-guide-recursive” non-nil.
(setq indent-guide-recursive t)
You may also change the character for guides.
(setq indent-guide-char ":")
Comparison with highlight-indentation
- look and feel
- better indentation handling for LISP-like languages
(foo (foo |(foobar baz |(foobar baz || (foobar | | |(foobar || |(qux)))) | | | (qux)))) indent-guide highlight-indentation
- indent-guide works fine even when the code is indented with TABs
- indent-guide is slower than highlight-indentation especially in very large blocks
does not work perfectly with following modes (commands) :
- company-mode, auto-complete-mode, popup.el (tooltip is sometimes not rendered perfectly)
- commands in pager.el
contributions are welcome !