Thursday, December 3, 2009

Re: placement of viminfo file on my work laptop (windows)

roman kalous schrieb:
> 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).
>
> I am sure this problem is not new, let me know the solution how to
> redirect viminfo to "C:\Documents and Settings\<my user name>\My
> Documents\_viminfo".
>
> THank you, Roman.

In the vimrc:

:set viminfo+=n$USERPROFILE\\My\ Documents\\_viminfo

- "+=" adds to the default value, to have the "'"-item
(E528: Must specify a ' value)
- the :set command requires the extra backslashes
- just assumed that $USERPROFILE can be used
:echo $USERPROFILE

:set vi?
viminfo='100,<50,s10,h,rA:,rB:,n$USERPROFILE\My Documents\_viminfo

or with command-line parameter
:h -i

--
Andy

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments: