Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.8k views
in Technique[技术] by (71.8m points)

listchars causing E474: Invalid argument in recent versions of vim

The snippet below has been in my vimrc for quite some time, recently (in the latest versions of vim) I am getting an error in the forth line:

set listchars=tab:? ,trail:◇,extends:?,precedes:?,eol:? " show tabs et. al.

I have not made any changes to my vimrc file and yet now I am getting this error:

Error detected while processing $HOME/.vim/rcfiles/editing:
line   11:
E474: Invalid argument: listchars=tab:?~V? ,trail:?~W~G,extends:?,precedes:?,eol:?

line 11 is the 4th line in the snippet.

set list                                            " show invisibles
set listchars=tab:> ,trail:-,extends:>,precedes:<,eol:$ " show tabs et. al.
if v:version >= 703
  set listchars=tab:? ,trail:◇,extends:?,precedes:?,eol:? " show tabs et. al.
  if (&termencoding ==# 'utf-8' || &encoding ==# 'utf-8')
    let &listchars="tab:u21e5 ,trail:u2423,extends:u21c9,precedes:u21c7,nbsp:u00b7,eol:u00ac"
    let &listchars="tab:u25b8 ,trail:u25c7,extends:u00bb,precedes:u00ab,nbsp:u00b7,eol:u00ac"
  endif

I haven't yet tried to go back to older versions where it works but I know that the error is thrown in version 8.0.1453 on one machine and version 8.2.2100 on another.

Oddly, if I type (or copy and paste) this line into vim, it is accepted with no problem, but in my vimrc I get an error on startup.

Any ideas?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...