On my .gvimrc, I have the following line:
map <f4> :!./%<
On a source file, I have to press F4 and then enter, but it works correctly, shows the output, and hangs until I press enter again.
If I change it for:
map <f4> :!./%< <CR>
It behaves shows the output, but doesn't wait until I press enter (and so the output becomes impossible to read).
Is there any way to show the output of a program, and hang until I press enter, without having to press enter before of the command, without having to open a separate window?