sponsor Vim development Vim logo Vim Book Ad

indentLine.vim : An indent guides plugin displaying thin vertical lines.

 script karma  Rating 1495/632, Downloaded by 10091  Comments, bugs, improvements  Vim wiki

created by
Yggdroot Chen
script type
This plugin is used for displaying thin vertical lines at each indentation level for code indented with spaces. For code indented with tabs I think there is no need to support it, because you can use :set list lcs=tab:\|\ (here is a space).

This plugin takes advantage of the newly provided conceal feature in Vim 7.3, so this plugin will not work with lower versions of Vim.

To install the plugin just put the plugin files in your ~/.vim (Linux) or ~/vimfiles (Windows).

If you use a plugin manager you can put the whole directory into your ~/.vim/bundle/ directory (Pathogen) or add the line Bundle 'Yggdroot/indentLine' to your .vimrc (Vundle).

You can change the color of indentLines:
for Vim, set g:indentLine_color_term in your .vimrc, e.g. let g:indentLine_color_term = 239,
for GVim, set g:indentLine_color_gui in your .vimrc, e.g. let g:indentLine_color_gui = '#A4E57E'

You can also change the indentLine char:
for both Vim and GVim, set let g:indentLine_char = 'c' where 'c' can be any ASCII character. You can also use one of , ┆ or │ to display more beautiful lines. However, these characters will only work with files whose encoding is UTF-8.


install details

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
indentLine.zip 1.0.6 2014-12-28 7.3 Yggdroot Chen -add support for showing leading white spaces
indentLine.zip 1.0.5 2013-04-18 7.3 Yggdroot Chen -trivial bug fix
-file type support and some new feature
-make performance better
indentLine.zip 1.0.4 2013-02-27 7.3 Yggdroot Chen -add command to toggle the indentLine
-use shiftwidth of modeline if modelines have set shiftwidth
-modify command ResetIndentLines as IndentLinesReset
-doc updated
indentLine.zip 1.0.3 2013-01-07 7.3 Yggdroot Chen change default indentLine char to "" if encoding is utf-8
change color in light background to grey65
indentLine.zip 1.0.2 2012-12-26 7.3 Yggdroot Chen -move plugin file to after/plugin
-make indentline char configurable
-add options to specify indent lines color
-add option to specify indent level
-add plugin doc file
-allow the indent guides to be redrawn if 'shiftwidth' changes
indentLine.vim 1.0.1 2012-12-12 7.3 Yggdroot Chen Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.