4

Is there a way to get Vim to show vertical lines that make it visually easier to see how many tab stops (or spaces) a line of code has been indented?

ib.
  • 27,830
  • 11
  • 80
  • 100
Matty
  • 33,203
  • 13
  • 65
  • 93
  • 2
    possible duplicate of [Is it possible to display Indentation guides in Vim?](http://stackoverflow.com/questions/2158305/is-it-possible-to-display-indentation-guides-in-vim) – Randy Morris Sep 19 '11 at 21:54

2 Answers2

8

I think this plugin does what you want.

https://github.com/nathanaelkane/vim-indent-guides

nickmbailey
  • 3,674
  • 15
  • 14
4

as a start, try this:

set list listchars=tab:»·,trail:·,extends:#

see :help 'listchars'

You can also place a vertical line at any desired column using (80 in this case):

highlight OverLength ctermbg=red ctermfg=white guibg=#592929
match OverLength /\%81v.\+/

As of vim 7.3, you can use set colorcolumn=80 (set cc=80 for short).

Fredrik Pihl
  • 44,604
  • 7
  • 83
  • 130