Sunday, February 27, 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 .viminfo work for a blind friend, and he keeps getting more and
> more errors.
>
> 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.

Sorry, didn't see this email before I responded to your other question.

In the case of trying to fix .viminfo corruption, direct examination or
modification of the file probably makes sense.


> 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 specifies a new filname and path. Or, a tab is missing in
> setting a mark, i.e., there is a line like this
>
> z^I13^I2
>
> instead of,
>
> ^Iz^I13^I2
>

If it's really necessary to share the .viminfo file between different
versions of Vim, I'm not sure what your best approach would be.

If the synchronization of the file isn't important though, you could at
least avoid the different-version corruption (if indeed that's what's
happening) by specifying the .viminfo file on Vim invocation.

E.g. on a system with Vim 7+, use something like:

alias vim='vim -i /path/to/viminfo-for-vim7'

On a system with a different Vim:

alias vim='vim -i /path/to/viminfo-for-vim6'
(assuming Vim 6 supports '-i', or just use the default location for the
lowest version)

Sorry to not have a better solution.

--
Best,
Ben

--
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: