Skip to content

Instantly share code, notes, and snippets.

@jbgo
Created November 28, 2012 15:03
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbgo/4161827 to your computer and use it in GitHub Desktop.
Save jbgo/4161827 to your computer and use it in GitHub Desktop.
Fixing VIM error "E576: viminfo: Missing '>' in line: ..."

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.

@queuebit
Copy link

queuebit commented Mar 6, 2014

Had the same issue.
Your solution fixed it too.
Still not sure the root cause.

@synergiance
Copy link

Just look for the blank line and delete it, it uses the blank line as a section separator and gets confused while looking for a section title

@frankie-loves-jesus
Copy link

Great :)

@RajeshDasari
Copy link

Thanks for the post ,it worked for me .

@DanielCornea
Copy link

it is very strange, but it also worked for me

@bshralam
Copy link

bshralam commented May 8, 2019

Don't know the root cause, but simply deleting the ~/.viminfo file also helps.

@johnmeshreki
Copy link

Thanks, worked for me!

@GrishaKh
Copy link

GrishaKh commented Sep 2, 2020

Thanks !

@bhagyeshjain
Copy link

I recently faced this issue and deleting the .viminfo file worked for me.

@russellgilbert
Copy link

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.

> C:\directory\file.ext
	"	1	0
6
	+	927	9
	+	978	0
	+	965	0

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment