简体   繁体   中英

How can I display <TAB> as bars in vim

I want to know is it possible to display the <tab> as | (bars) when coding in vim like this 图片 Are there any ways to show them.

Please any solution other than set listchars and set list as it affects eol and spaces.

:set list
:set lcs=tab:\|\  " the last character is space!

The tab setting consists of two characters: | and a space. The first character is used once. The second character is repeated to fill the space that the tab normally occupies. See :h lcs .

Sample result:

在此处输入图片说明

However, setting the second character to space is not very helpful, as it is difficult to distinguish spaces followed by a tab, for instance. Consider changing it to another character, eg:

:set list listchars=tab:\|\-

Sample result:

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM