[Bug 11899] Re: Cannot recover unsaved email after system crash

pi-rho 11899 at bugs.launchpad.net
Sun Jun 3 06:53:44 UTC 2012


If you place the following three lines in your ~/.vimrc, vim will never
use /tmp

set backupdir=~/.vim/backup
set viewdir=~/.vim/views
set directory=~/.vim/swap

and also make sure that those directories exist:

mkdir -p ~/.vim/{backup,views,swap}

The behavior you cite in your bug report is the default functionality of
the software and it is functioning as the author intended.  This is not
a bug.  The configuration that I spoke of is how you change that default
behavior.

** Changed in: vim (Ubuntu)
       Status: Confirmed => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to vim in Ubuntu.
https://bugs.launchpad.net/bugs/11899

Title:
  Cannot recover unsaved email after system crash

Status in “vim” package in Ubuntu:
  Invalid

Bug description:
  I was composing an email in mutt (with vim) when my laptop froze. 
  Unfortunately, I wasn't able to recover the email when I rebooted, because:
     - mutt uses /tmp for the file that it gets vim to edit
     - vim puts its .swp file in the same directory as the file you're editing
  (so, in this case /tmp)
     - and the boot scripts delete /tmp on every boot

  I'm filing this bug against vim, rather than mutt, because I'm guessing the
  right fix for this is to make vim never use /tmp, at least with the default
  settings.  I can't see a way to fix this with current vim -- the syntax for the
  'directory' setting has no way to say "always use ~/ rather than /tmp", which is
  what I'd prefer.  vim's help even warns against using /tmp swapfiles, but
  provides no way to avoid it when another program requires vim to edit a file in
  /tmp.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/vim/+bug/11899/+subscriptions




More information about the foundations-bugs mailing list