History Report a problem
Article Edit this page Discussion

Disable the "Hit any key to close this window" message in remote editing

From Vim Tips Wiki

Jump to: navigation, search
 

This tip is deprecated for the following reasons:

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

Tip 1385Previous TipNext Tip

Created: November 13, 2006 Complexity: advanced Author: Diomidis Spinellis Minimum version: 6.0 Karma: 71/21 Imported from: Tip#1385


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

[edit] 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?

Rate this article:

Share this article:

Hubs Highlights International Sites Wikia messages
Entertainment
Gaming
Cartoons & Comics
Science Fiction
Hobbies
Sports
See all...
Grand Theft Auto
Terminator Wiki
Legend of Zelda Wiki
Flash Gordon
Everquest II Wiki
Yo-Yo Wiki
German
Spanish
Chinese
Japanese
More...
Wikia is hiring for several open positions
Send this article to a friend
"Disable the "Hit any key to close this window" message in remote editing"
 
 
Hi!

I thought you'd like this page from Wikia!

http://vim.wikia.com

Come check it out!
Send confirmation