Search code examples
vimindentationvim-syntax-highlighting

Provide visual cues for indent level in vim


I've used listchars to mark certain whitespace characters for visual identification, but I am wondering if there is a similar feature to visually mark the indentation level in vim. Something like a visible marker for a potential fold-line. Something like this:

#/bin/bash
for i in 1 2 3 ; do
.   if [ true ] ; then
.   .   echo "there is an unobtrusive"
.   .   echo "dot character that marks"
.   .   echo "the indentation level."
.   fi
done

I'll bet an imaginative use of colorcolumn could create this, but maybe there is a pre-canned vim script that does this already.


Solution

  • There are plugins that implement this: