Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim error E510: Can't make backup file (add ! to override)

Tags:

vim

vi

windows

I am using Vim on Windows and decided to create a separate directory for all my backup files created by vim.

I am using Vim from my command prompt and not using the vim GUI(gVim).

I looked at this post and added the following lines in my _vimrc

set backup
set backupdir = D:\\VimTemp

I have already created D:\VimTemp on my system.

Now whenever I try to save changes to my file using :w I get the following error message

"PenProperties.py" E510: Can't make backup file (add ! to override)

I have already tried setting the backupdir in the following ways:

  • set backupdir = D:\\VimTemp

  • set backupdir = "D:\\VimTemp"

  • set backupdir = "D:\\VimTemp\\"

  • set backupdir = "D:\VimTemp"

Now, I have already looked at similar questions on stackoverflow but the problem is still there.

So, my question is how to make this work properly.

like image 836
RanRag Avatar asked May 19 '12 11:05

RanRag


1 Answers

Kill the spaces around =

set backupdir=D:\\VimTemp

should work if you've created the directory.

like image 53
pb2q Avatar answered Nov 16 '22 01:11

pb2q