使用 listchars 在 Vim 中显示前导空格 [英] Using listchars to show leading whitespace in Vim
本文介绍了使用 listchars 在 Vim 中显示前导空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在制表符上使用空格.在 Sublime Text 2 中,我会像这样显示前导空格:
I use spaces over tabs. In Sublime Text 2, I would have leading spaces show like so:
我有我的 .vimrc 设置来显示选项卡、行尾等.但我不确定如何复制我在 Sublime 中的内容.这很方便,因为我在使用空格时仍然可以更容易地看到缩进.
I have my .vimrc setup to show tabs, line endings, etc. But I'm not sure how to replicate what I have in Sublime. It was handy as I could still see indentation much more easily when just using spaces.
这是我现在的路线:
set listchars=eol:¬,tab:→→,extends:>,precedes:<
推荐答案
list
+listchars
组合可以显示尾随空格但不能显示前导空格.
The list
+listchars
combo can show trailing spaces but not leading spaces.
你可以试试vim-indent-guide.
这篇关于使用 listchars 在 Vim 中显示前导空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文