I was getting the error E576: viminfo: Missing '>' in line: [file names]
about ten times with various file names whenever I opened or saved a buffer in Vim. This happened both in normal vim and with MacVim. This was followed by the line E136: viminfo: Too many errors, skipping rest of file
. Other than these obnoxious messages, Vim itself worked fine.
To fix it, I opened ~/.viminfo
and deleted everything in the section labeled # History of marks within files (newest to oldest):
. I lost all my history of marks within files, but that was acceptable for me since I was starting a new coding session for the day.
So far, I'm not sure how my viminfo got into this state.
I believe the problem is any line in the section
# History of marks within files (newest to oldest):
that's not blank and begins with anything other than ">" or a tab. I had a sequence of lines like the ones below, and the "6" was causing this problem - deleting that one line fixed it.This makes sense since the error is "Missing '>' in line".
Starting from the top of that section, you can search downward for bad lines with the command:
/^[^>TAB]
(but type the tab key in place of TAB)Thanks for creating this page so I could find it.