When I'm writing over webdavfs vim temporary doesn't handle temporary files properly:
ll -a
ls: cannot access .htaccess.swp: No such file or directory
ls: cannot access .htaccess.swx: No such file or directory
total 15196
drwxrwxr-x 2 sergio sergio 448 Ago 22 04:48 .
drwx------ 12 sergio sergio 528 Ago 22 04:47 ..
-rw-rw-r-- 1 sergio sergio 21 Ago 22 04:48 .htaccess
-????????? ? ? ? ? ? .htaccess.swp
-????????? ? ? ? ? ? .htaccess.swx
How I can open a file with vim setting swap files in other directory ?
Note I just want this happens when I'm under webdav directories.
UPDATE : yes,
vim "+set noswapfile" .htaccess
Could be a solution but somehow the files .htaccess.swp .htaccess.swx still appears in webdav directory ...
Update 2016-03-16: still don't have an working solution , Editing like Remote Files may be a solution, anyone ? other solution seems to be https://github.com/kana/vim-metarw
Update 2016-09-11: something like this could work , but seems works even better edit ~/.davfs2/davfs2.conf and set "use_locks 0"
if expand("%:p:h") =~ '^/home/sergio/webdav'
echo "in webdav dir"
set directory=/tmp
set backupdir=/tmp
colorscheme desert
endif
set noswapfile
?directory
andbackupdir
so that Vim stores all those files in~/.vim/tmp
or some such ... Didn't this work for you? Is this not an option?