Is it possible to display indentation guides in Vim?

This answer is a bit late to the party and also a shameless plug. :)

Regardless, try my Indent-Guides.vim plugin. It was created to scratch my own itch regarding the lack of indent guides in vim. I got fed-up waiting for someone else to come along and build it, so I just did it myself.

Features:

  • Can detect both tab and space indent styles.
  • Automatically inspects your colorscheme and picks appropriate colors (gVim only).
  • Will highlight indent levels with alternating colors.
  • Full support for gVim and basic support for Terminal Vim.
  • Seems to work on Windows gVim 7.3 (haven't done any extensive tests though).
  • Customizable size for indent guides, eg. skinny guides (soft-tabs only).
  • Customizable start indent level.

Here’s a few screenshots of the plugin in action: put your mouse here and click.


If you indent code with spaces, you can try my plugin: https://github.com/Yggdroot/indentLine, it displays thin vertical lines but not thick vertical lines as the above answers mentions. If you indent code with tab, just :set list lcs=tab:\|\ (here is a space)