I am running Cygwin on windows. Several times now I've had a swap file left behind from vim after a crash, but it can't be recovered or deleted. "ls -l" shows this: -rw-r----- 1 Unknown+User Unknown+Group 12288 Feb 26 15:27 .pl.pl.swp
I'm not allowed to be an admin on my box, so I can't delete it. I'm not the owner so I cant' delete it either - it has unknown ownership.
Any ideas on how I can delete it (without pulling in a machine admin each time)? Can I have vim put its swapfiles in some other folder so at least they won't clutter up my working dir (I need the right .vimrc settings for running on windows)?
You can disable swapfiles entirely with set noswapfile
or, if you still want that feature but not the clutter, tell Vim to put those files in a dedicated location:
set directory=c:\\tmp
Note that you'll still have to delete existing swapfiles manually.
Read the following help sections for more information:
:help 'swapfile'
:help swap-file
:help 'directory'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With