Changing the default value for 'directory' seems a bit drastic and is out of the question, as that has other unwanted effects (e.g. when several users edit the same file you won't notice it). The correct way is to configure your 'directory' setting as you did already.
It might be possible to modify netrw to not create swapfiles. I do not know offhand, if this is really possible, it could be that swapfiles will be created anyhow and disabling swapfiles within netrw might come too late, not sure yet.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Thanks for the speedy response @chrisbra. I definitely didn't consider the multiple users point, ty vm.
It would be good if we could avoid creating swapfiles just for netrw. Though, I am more surprised that we make any in the first place.
Why does netrw make swapfiles? Through all the study and research that we did (in the linked StackExchange post), we were never able to catch the file long enough to read its contents.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
this is just a guess, I only had a quick look. Can you try this patch?
diff --git a/runtime/pack/dist/opt/netrw/autoload/netrw.vim b/runtime/pack/dist/opt/netrw/autoload/netrw.vim index 5aa087afb..af58267fa 100644 --- a/runtime/pack/dist/opt/netrw/autoload/netrw.vim +++ b/runtime/pack/dist/opt/netrw/autoload/netrw.vim @@ -4256,12 +4256,12 @@ endfunction " NetrwKeepj [keepalt] <OPT> <CMD> <FILENAME> function s:NetrwEditFile(cmd,opt,fname) if exists("g:netrw_altfile") && g:netrw_altfile && &ft == "netrw" - exe "NetrwKeepj keepalt ".a:opt." ".a:cmd." ".fnameescape(a:fname) + exe "NetrwKeepj noswapfile keepalt ".a:opt." ".a:cmd." ".fnameescape(a:fname) else if a:cmd =~# 'e\%[new]!' && !&hidden && getbufvar(bufname('%'), '&modified', 0) call setbufvar(bufname('%'), '&bufhidden', 'hide') endif - exe "NetrwKeepj ".a:opt." ".a:cmd." ".fnameescape(a:fname) + exe "NetrwKeepj noswapfile ".a:opt." ".a:cmd." ".fnameescape(a:fname) endif endfunction
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()