sponsor Vim development Vim logo Vim Book Ad

basic Tip #307: annoying "Hit any key to close this window..."

 tip karma   Rating 1337/355, Viewed by 4669 

Read and edit this tip on the Vim tip wiki. The wiki may have a more recent version of this tip.

created:   August 11, 2002 5:57      complexity:   basic
author:   Chia-po Wei      as of Vim:   6.0

i use gvim and bash heavily under win98.
i have

let $HOME = substitute($HOME, '\', '/', 'g')
set shell=bash\ --rcfile\ \"$HOME\"_bashrc\ -i

in my _vimrc, and something like

function br()
{
if [ $1 ]; then
        explorer.exe ${1//\//\\}
    else
        explorer.exe ${PWD//\//\\}
    fi
}

in my _bashrc. when i finish editing one html file,
i simply type :!br %

everything works fine now. but when :!br % executes,
one console window will bump out and wait me to press some
key to contiue. i consider this quiet annoying. i want the console window
to disappear automatically if no fault has happened.
does anyone know how to achieve this?
thanks.

 rate this tip  Life Changing Helpful Unfulfilling 

<< Open a web-browser with the URL in the current line | Move through wrapped lines. >>

Additional Notes

ephemera@pchome.com.tw, August 11, 2002 8:57
i find
set shell=bash\ -i
can replace
set shell=bash\ --rcfile\ \"$HOME\"_bashrc\ -i
as long as $HOME is properly set
Chia-po Wei
none, August 12, 2002 5:54
I think a tip is supposed to ANSWER a question, not pose one.
Anonymous, August 12, 2002 9:39
Obviously, none don't know.
SpiceMan, August 14, 2002 10:32
instead of using
:!br %

use
:silent !br %

that'll do it, just asign it to a key ;)
ephemera, August 18, 2002 6:03
thanks to SpiceMan :p

i feel sorry to pose my problem here.
but i think the description of my problem may be helpful to someone
using both bash and vim.
jdsumsion, September 9, 2002 9:07
Try recompiling the source for vimrun -- it is the program that runs and displays the "Hit any key to close this window..." message.
If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo