Closed
Description
When editing a remote file, saving the file with :w
is blocking the editor until the file is saved to the remote. This can vary dependent on file size and remote connection.
Would it be possible to offer a setup in the wiki similar to the fugitive setting of :Gpush
to make this non-blocking?
netrw-write acts on the builtin write command :write
via the autocommand events BufWriteCmd
and FileWriteCmd
as can be seen in $VIMRUNTIME/plugin/netrwPlugin.vim
:
au BufWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufWritePre ".fnameescape(expand("<amatch>"))|exe 'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau BufWritePost ".fnameescape(expand("<amatch>"))
au FileWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileWritePre ".fnameescape(expand("<amatch>"))|exe "'[,']".'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau FileWritePost ".fnameescape(expand("<amatch>"))
Metadata
Metadata
Assignees
Labels
No labels