Tuesday, May 4, 2010

Re: Temporary files (was:Fwd: You have joined the group vim_use@googlegroups.com)

On May 3, 6:11 am, Tony Mechelynck <antoine.mechely...@gmail.com>
wrote:
> On 03/05/10 04:07, Lissa Aguilar wrote:
>
> > ---------- Forwarded message ----------
> > From: Lissa Aguilar<lissa.agui...@gmail.com>
> > Date: Sun, May 2, 2010 at 10:04 PM
> > Subject: Re: You have joined the group vim_use@googlegroups.com
> > To: vim_use<vim_use+subconfirm@googlegroups.com>, v...@vim.org
>
> > I have a question about the temporary files created by VIM on my
> > windows xp machine. Is there a way to get rid of them? and just have
> > my main file that I work on?

> 2. I suppose you mean backup files. If your Vim executable is compiled
> with the +writebackup feature (i.e., +writebackup appears in the output
> of the ":version" command, and ":echo has('writebackup')" (without the
> quotes) gives a nonzero answer), you can ":set writebackup" (manually or
> in your vimrc). With that option set, backups will still be created, but
> they will be removed as soon as the new version of the editfile has been
> written successfully. Another, less safe, option consists in ":set
> nobackup" which disables backups completely; but in that case you run
> the risk of losing both old and new versions if something goes wrong
> while saving the file to disk.
>
> Best regards,
> Tony.

I'm using Vim 7.2 patches 1-267 on Windows XP (old, I know). According
to the help the default for the "backup" option is off, so if you are
getting backup files such as myfile.txt.~ appearing, you might like to
try this command to find out where it is being turned on, instead of
just turning it off again with set nobackup.

:verbose set backup?

You might mean swapfiles instead of backup files, i.e. files such as
.myfile.txt.swp appearing while you do the editing? You can turn this
off with ":set noswapfile" in your vimrc. I work with this setting and
haven't had no problems, but from the help these files can be useful
if you crash and need to recover your work. You can configure them to
be stored in a particular place instead of alongsideto the file you're
editing, you might want to think about doing this instead. (Maybe I
should as well...) See ":help swap-file".

Incidentally see ":help vimrc" to find out where in XP the "vimrc"
file you want to edit is kept, it probably isn't called _cshrc. Or
just use the command ":e $MYVIMRC" to open it and find out.

regards,
Geoff

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