12

Recently on starting vim I've been getting an error message like this:

E575: viminfo: Illegal starting char in line: wait_until(lambda
_:<80><fc>^B ^[ldWA)^[:w^Mkkkdd^[:w^M<80><fd>c<80><fd>b248Gwwi_zzz^[:w^M<80><fd>c<80><fd>bkkkkj/refresh^M^c^[ma/browser.rfer<80>kb<80>kb<80>kbresh^[/refresh^MnN^ceb<80>kbdrie<80>kbver^[:w^M<80><fd>c<80><fd>b<80><fd>c<80><fd>b<80><fd>c<80><fd>b<80><fd>c<80><fd>b<80><fd>,<80><fd>-<80><fd>.^[^[^[^[<80><fd>W<80><fd>,<80><fd>.<80><fd>c<80><fd>b<80><fd>c<80><fd>b<80><fd>c<80><fd>bjodisplay_remaining_hours=<80>kb = trello9"<80>kb<80>kb("^V^V")^[^wwwwdt/..:w^M/zzz^Mkkjo@display_remaining_staff_hours^[ma/ldispla<80>kb<80>kb^[<80>kb^[ggjjjjjjjjjjjjjjjjjjjjjjjjjjjlkkkllllllllllllllllis<80>kb_staff^[*A.acceptance_test("At<80>kbT1")^[:w^Mjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdt(^[:w^M<80><fd>L<80><fd>L<80><fd>L<80><fd>L<80><fd>,<80><fd>.<80><fd>L<80><fd>L<80><fd>c<80><fd>b<80><fd>c<80><fd>b<80><fd>c<80>

It doesn't happen when I launch with vim -u NONE but it does happen if I clear out my entire ~/.vimrc and move my ~/.vim directory. It looks like there's an error in a tags file somewhere but I can't find with one.

Any ideas?

10 Answers 10

16

Turns out the answer was in the error message all along.. the offending file was ~/.viminfo which was somehow corrupted.

3
  • well, it does say the error is in the viminfo...
    – elyashiv
    Mar 6, 2015 at 14:20
  • 2
    It does, but it says viminfo, not .viminfo or ~/.viminfo, so as someone who didn't even know that that file existed, it looked more like a generic tag than a filename. Mar 6, 2015 at 21:12
  • And on windows it tends to be: "C:\Users\<username>_viminfo" Feb 9, 2016 at 4:23
3

For me, this problem keeps showing up even if I delete the ~/.viminfo file - not right away, but a couple of days later.

I just noticed there's a way to skip using the viminfo file entirely, as detailed here:

https://unix.stackexchange.com/a/332707/22734

In summary, put the following in your ~/.vimrc

let skip_defaults_vim=1
set viminfo=""
2

To solve this:

  1. rm ~/.viminfo
  2. vim ~/.viminfo # new file, leave it blank, then just wq.
  3. source terminal et voila
2
  • 2
    Welcome to Vi and Vim! Could you clarify "source terminal"? I'm not sure I understand what you mean. Also note that not all users are on *nix, so rm may not be the right term: perhaps you meant "Remove"? (similar with ~ in paths, etc.) I assume you mean :wq? If you structure the bullets in full sentences, you won't need to # comment out parts, and the whole answer would be more readable.
    – D. Ben Knoble
    Jun 10, 2021 at 23:35
  • In addition to what Ben said (which I agree 100% with) note that your second step should be touch ~/.viminfo which is much more efficient than opening vim just to create a file. (Or even replace steps 1 and 2 by echo '' > ~/.viminfo)
    – statox
    Jun 11, 2021 at 8:24
1

Noticed this error when I had forgot to start the line with : in .viminfo file for example set tabstop=4. To get rid of this error had to add : at the beginning of the line as below.

:set tabstop=4
0

I had the same issue. I think it occurred after I deleted a repo from my computer.

I first noticed it when trying to do a git merge from terminal, so I originally assumed it was an issue with git.

As describe above it is an issue with the ~/.viminfo file.

I resolved it by opening the ~/.viminfo in a text editor and removing the leading ".

Now everything seems to work fine again.

0

Removing ~/.viminfo only helped me to solve the problem temporarily. Later the error poped up again.

I finally resolved the problem by adding a > in the ~/.viminfo file.

I opened ~/.viminfo using vim and there was one line in red that showed up to me, so I just fixed that line through adding a >. You should add or delete something in your ~/.viminfo by comparing the wrong line in ~/.viminfo and other right lines.

0

I'm on Windows, and resolved this by removing the _viminfo file at user home directory (i.e. c:\Users\<username>\_viminfo).

0

Try this:

  1. rm ~/.viminfo
  2. touch ~/.viminfo

This solves my problem.

1
  • 1
    This is already covered in the other answers.
    – Herb
    Jun 20, 2022 at 14:59
0

Maybe a viminfo save in default ansi encoding result illegal char, I have add c in viminfo parameters saved the question.

set viminfo=%,<100,'10,/50,:100,h,f0,c,n~/.vim/viminfo

See: https://vimhelp.org/options.txt.html#%27viminfo%27

0

For me, the problem was caused because I'd done a search-and-replace to replace a string which had been encoded in utf-8 but opened by Vim as encoding=latin1 . The string was saved in C:\Users\me_viminfo under "Command Line History" in these lines:

?
â€/if
|2,1,1681779433,10,"â€/if"

Deleting those lines from _viminfo stopped the error messages. But if I do a search-and-replace like that again, it will reappear.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.