Skip to content

Cannot open undo file for writing #14

Closed
M4T1A5 opened this Issue Jan 26, 2012 · 8 comments

3 participants

@M4T1A5
M4T1A5 commented Jan 26, 2012

Trying to write something to a directory where the user does not have write permission (say /etc) you get something like this:

  1. Insert some text
  2. Try to save as /etc/foo
  3. Error: E828: Cannot open undo file for writing: /etc/.foo.un~

It still writes the file, but you lose all content from the buffer and have to reopen if you want to edit more.

@chrisbra
Owner
@chrisyip

@chrisbra you mean the "persistence undo" feature causes this error?
If yes, I think it's a little wired, because of I didn't enable this feature, and never saw any .foo.un~ file.

@chrisbra
Owner
@chrisyip

Tried, I got nothing.

With

:verbose set fileencoding

I got:

fileencoding=utf-8
    Last set from ~/.vimrc
@chrisbra
Owner
@chrisbra chrisbra added a commit that referenced this issue Jan 30, 2012
@chrisbra Check for undofile-setting #14 e65a11d
@chrisbra
Owner
@chrisyip

Perfect!
If "persistence undo" is disabled, there's no error message at all.
Just save files silently.

@M4T1A5
M4T1A5 commented Feb 1, 2012

Yes the problem seems to be fixed for me too! This is great because now i can use this plugin :)

@chrisbra chrisbra closed this Apr 21, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.