Vim Tips Wiki
Register
Advertisement

This tip is deprecated for the following reasons:

Use current netrw; don't patch it - see comments.

Tip 1385 Printable Monobook Previous Next

created 2006 · complexity advanced · author Diomidis Spinellis · version 6.0


When using the remote editing functionality under Microsoft Windows, vimrun.exe annoyingly leaves an open window with the prompt "Hit any key to close this window". To disable this feature, modify in the Vim plugins directory the file netrw.vim as follows:

 --- netrw.vim.orig Mon Jun 07 15:06:24 2004
 +++ netrw.vim Mon Nov 13 17:32:28 2006
 @@ -342,10 +342,10 @@
 if g:netrw_cygwin == 1
 let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
 " call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile)
 - exe "!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile
 + silent exe "!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile
 else
 " call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile)
 - exe "!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile
 + silent exe "!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile
 endif
 let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
 let b:netrw_lastfile = choice
 @@ -767,10 +767,10 @@
 if g:netrw_cygwin == 1
 let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
 " call Decho("executing: !".g:netrw_scp_cmd.useport." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
 - exe "!".g:netrw_scp_cmd.useport." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')
 + silent exe "! ".g:netrw_scp_cmd.useport." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')
 else
 " call Decho("executing: !".g:netrw_scp_cmd.useport." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
 - exe "!".g:netrw_scp_cmd.useport." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')
 + silent exe "! ".g:netrw_scp_cmd.useport." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')
 endif
 let b:netrw_lastfile = choice

Comments[]

 TO DO 
Probably should delete this tip. It might have been handy in November 2006, however it's a very bad idea to patch tools, particularly netrw which is frequently updated.

Dr.Chip commented:

IMHO, it's much better to submit patches for netrw to me, directly.
Be that as it may, did you try :let g:netrw_silent= 1 in your .vimrc?

Advertisement