vimrc - Because W in vim uses spaces to distinguish strings, is there any way to highlight spaces?
大家讲道理
大家讲道理 2017-05-16 16:34:25
0
2
752


Like the places pointed by the arrows, these places look like there are spaces or not. The spaces are not highlighted, and the W moving position is difficult to control.

So I want to know how to configure it to highlight spaces, or use other characters such as % to replace spaces.

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(2)
仅有的幸福

Method found on stackoverflow:

Settings:

:set listchars+=space:␣

Display:

:set list

Effect:

Before setting up:

After setting up:

Similarly, you can set the display of other hidden characters:

:set listchars=eol:¬,tab:>·,trail:~,extends:>,precedes:<,space:␣

Note that vim is only supported after version 7.4-710! The latest version of CentOS 7 is only 7.4-160, Ubuntu 15.10 is only 7.4-712, and some versions of Raspberry Pi are only 7.3. It is currently confirmed that the latest version of Ubuntu 16.04 is 7.4-1689 (what a damn conscience!). Only this platform is available for actual testing, and other distributions cannot be used because the versions are too low.

Reference: http://stackoverflow.com/ques...


Addition: I just noticed that the questioner uses gvim instead of vim. gvim is not clear. Since there is a GUI, why not use other more efficient editing tools.

刘奇

:/ + Enter ->(Last line mode input:/space, enter to highlight all spaces)

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template