> I got a laptop, XP windows, many politics & scripts applied. Among
> others, the $HOME variable is set to a network drive. Naturally, once
> I go off-line, I spend minutes waiting for nothing and then losing any
> history of commands.
>
> I simply need to set the viminfo file to my local harddrive and
> preferably to my local home directory so that my gvim never want to
> access any other drives than my local (temporaries, viminfo,
> whatever).
>
> I am not able to change the $HOME variable (and I even do not aim to).
>
> I tried
> set viminfo=nC:\DOCUME~1\<my user name>\LOCALS~1\MYDOCU~1\_viminfo
>
> But that did not work.
>
> I do not know where to place the command (vimrc, elsewhere ??) or if
> it depends where it is placed. I do not even know whether it is
> correct (I would doubt that as I obtain some E528 message which I do
> not understand and even do not want to).
That attitude won't get you very far.
Apparently, vim requires that the 'viminfo' option contain at least
the ' specifier, which the error message is telling you is missing.
If the only thing about the 'viminfo' option you want to change is
the location of the file, just append the file name to the option
using ":set+=", like this:
:set viminfo+=nC:\\Documents\ and\ Settings\\<your user name>\\My\ Documents\\_viminfo
which is all one line.
:help viminfo-write
which is just a little ways into the
:help viminfo
section, says that the viminfo file is written just before vim
exits. Therefore, you can set 'viminfo' any time you want before
you quit vim. Your _vimrc would be a good place to set 'viminfo'.
As for knowing how to quote the path name, I wasn't sure, so I tried
quoting just the spaces, executed
:set viminfo?
and saw that it wasn't right, so I reset the option,
:set viminfo&
and tried again with \\ between directories. I think you can use
forward slashes instead of backslashes in this context, too, but I
didn't try that.
I assume that your _vimrc is on your local hard drive, too, or none
of this will do you any good unless you start vim with the -i
option.
Regards,
Gary
--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
No comments:
Post a Comment