开发者

Vim: vertical lines indicating how much a line of code has been indented?

开发者 https://www.devze.com 2023-04-06 03:51 出处:网络
Is t开发者_StackOverflowhere 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?I think this plugin does what y

Is t开发者_StackOverflowhere 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?


I think this plugin does what you want.

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


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).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号