0

Every time I open a file (by which I mean what I would call a text file, typically one containing Python code) I get two lines of error messages that read

  • E576: viminfo: Missing '>' in line: 555147747^I0
  • E576: viminfo: Missing '>' in line: ^I"^I72^I0

I have searched for an answer and found people discussing this problem and solving it but (a) they are Unix users and what they refer to doesn't apply - as far as I can tell - to me as a Windows user and (b) the posts are 7 years old so I'm guessing that the cause of my problem or its solution will be different.

It dawned on me that the ^I in the error message is a \t i.e. a tab so the second message for example is saying that a '>' was expected in a line that contains \t"\t72\t0 but the file - which I assume is

Program Files (x86)\vim\vim81\syntax\viminfo.vim

does not contain such a line or indeed any occurrences of '72' at all.

  • 2
    Are you sure that's the right viminfo file? It's probably an error in the _viminfo file in your home directory, which you could safely delete, and it will be recreated the next time you open vim. – Herb Wolfe May 29 at 17:20
  • Thanks Herb - it is as you say. I deleted the viminfo I found in /Users/Me and the error has gone away. (It never occurred to me that Windows had an analogue of "~" so I ignored "~/.viminfo" as being meaningless to Windows users. D'oh!) – user22480 May 30 at 17:38
0

As Herb Wolfe wrote in his comment this is a problem with the viminfo file. On Windows this is $HOME\_viminfo (~/.viminfo on Unix).

The viminfo files is written when Vim exits and stores information to be available when Vim starts again. This contains command line history, search history, register and a lot more. See :help viminfo for the details.

For some reason your viminfo file became invalid and Vim is complaining about this. When the file is invalid, Vim will not overwrite it. So it will complain about the invalid file on every restart. My terminal Vim also complains on exit (I "destroyed" my viminfo on purpose to write this answer).

I guess that repairing this file is not trivial, so the easiest solution is to just delete or rename it.

Unfortunately I have no idea how a viminfo file might become invalid.

BTW: If you get a error message with a E... ID, always feed that ID to the help command. Like: :help E576. This might not explain the actual error, but you get at least some context.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy