I'm looking for an Emacs package or configuration that makes it possible to mark indentations with vertical lines, like those shown in the following screenshot of Sublime Text:
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
Installation is easy. Invoke
git clone email@example.com:antonj/Highlight-Indentation-for-Emacs.git . in, say,
~/.emacs.d/highlight-indents and add
(add-to-list 'load-path "~/.emacs.d/packages/highlight-indents/") (require 'highlight-indentation)
.emacs. Then, when visiting a file you can
M-x highlight-indentation-mode RET to enable the minor mode.
You can also use
highlight-indent-guides-mode and add it as a hook to
prog-mode, so that it gets loaded automatically.
In Spacemacs, I did it by first installing it with
M-x package-install or adding it as a user-defined package in
prog-mode hooks, "ins", enter
You can configure it via
highlight-indent-guides and change the indent character, coloring, etc.
So far, it works wonders and renders quickly.
I think you may want to look at indent-guide mode. It gives indentation of code blocks dynamically when we move the cursor. Moreover, it is easy to set up your favorite indent characters like
| as well as the background color of intentions.