This modes puts indentation highlights below the starting character of a line on subsequent lines, like this:
some line
| some other line
| | another line
| | | an indented line
| fourth line
final line
This works in every mode, but is more useful in haskell, which doesn't require indentation levels to be at multiples of a specific level.
If the minor mode hl-indent-mode-blocks is on, this mode will
instead highlight blocks of indentation like so (where different
symbols represent different colours):
xxxxxxxxxxxxxx
oooooooooooo
oooooooooooo
*******
*******
**********
oooooooooooo
**********
xxxxxxxxxxxxxx
Enable hl-indent-mode.
There is also hl-indent-mode-blocks, but it is less useful
because of limited color contrast, depending on face settings.
- You can customize faces
hl-indent-face(which isfringeby default), and alsohl-indent-block-face-1, from 1 to 6. - To easily see where
hl-indent-modeputs its highlights, use the functionhl-indent--debug-facestogether with eitherhl-indent-modeorhl-indent-mode-blocks. - The mode will refuse to turn on in a very very large file, because right now it examines every single line once, which can take too long.
- Indentation highlights override any non-trivial background. This is a problem for things like comments that might have a background different from the default background. It also conflicts with other highlights, like hl-line-mode.
