【发布时间】:2024-01-18 09:44:02
【问题描述】:
我试图在 Vim 中将尾随空格显示为句点,但制表符显示为制表符。
这是我正在查看的帮助文档。
'listchars' 'lcs' string (default "eol:$")
global
{not in Vi}
Strings to use in 'list' mode and for the |:list| command. It is a
comma separated list of string settings.
*lcs-tab*
tab:xy Two characters to be used to show a tab. The first
char is used once. The second char is repeated to
fill the space that the tab normally occupies.
"tab:>-" will show a tab that takes four spaces as
">---". When omitted, a tab is show as ^I.
我的.vimrc 文件中目前有以下两行。
exec "set listchars=tab:>-,trail:\uB7,nbsp:~"
set list
我应该用什么替换字符 >- 以便标签显示为普通标签?
字符序列尝试并失败:
- 两个空格
- 两个空格和
\在每个空格之前转义 - 制表符和空格
当我执行后者时,我得到一个看起来像这样的错误。
Error detected while processing /home/hq6/.vimrc:
line 202:
E474: Invalid argument: listchars=tab:^I
【问题讨论】:
标签: vim