Saturday, February 26, 2011

Re: Help! how to check viminfo for errors?

On Sat, 26 Feb 2011, howard Schwartz wrote:

> I know my pleas are getting old for you veterans. But I am trying to make

Only rejoined the list recently, but searching doesn't show up any replies
to your messages about this.

> .viminfo work for a blind friend, and he keeps getting more and more errors.

Increasing? This seems a bit odd. My first thought would be whether
the media he is writing to is beginning to die.
>
> I've scoured both the usual and unusual documentation, the scripts library,
> the web, and vim_use archives - and still can not find certain basic
> information about the .viminfo file, and how different versions of vim
> interact with it. The usual advice is to delete the file, losing all one's
> mark info., if it corrupts.

Agrees with my searches as well. It may be something for which you'd need
to read the source, but before we get to that....
>
> Most error messages seem to be spawned by vim making a simple format error
> when writing this file. For example, an initial > ls left out of a line that

I'm thinking that 'ls' should be 'is' there...

> specifies a new filname and path. Or, a tab is missing in setting a mark,

For the first case, the user may be prepared to add f0 to the viminfo option
and suppress saving of filenames, but that's an annoying work around.

> i.e., there is a line like this
>
> z^I13^I2
>
> instead of,
>
> ^Iz^I13^I2

I was going to suggest the c flag, in order to fix encoding issues, but
missing out a tab is unlikely to be that. Also encoding issues I think
would only come up if the user is editing something like raw Braille,
stored however that is. I've seen people post that to blindness lists
in the past, and it looks rather odd. I could imagine Vim treating it
as a different encoding.
>
> When I manually edit each wrong viminfo line, the error messages disappear.
> Has anyone written a description of the required format for this file? Is
> there some script that can check the file for format errors and/or fix them?
>
> Apparently, vim does not dynamically check much for the current state of a
> file when it updates (overwrites) viminfo.

What I saw in the docs says it attempts to merge the file, which may explain
accumulation of errors, unless you mean that there are more errors despite
your corrections.

The user isn't using some kind of removable media, which is being removed
too early? The r flag would prevent viminfo being written if that were
the case.

Hugh

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment