gVim in Windows opens external console for bang ex-commands

11 views
Skip to first unread message

Enan Ajmain

unread,
Oct 15, 2022, 6:14:58 AM10/15/22
to vim...@googlegroups.com
Ex-commands like `:!dir` is spawning a console, upon which the external
command is being executed and the result is being shown. Afterwards,
both the external console _and_ gVim each presents a Press Enter prompt.

I haven't used gVim before. Not more than a cursory glance anyway. I was
wondering if this is the intended behavior or if I have garbled
something while building it.

VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Oct 15 2022 15:20:35)
MS-Windows 64-bit GUI version
Included patches: 1-733

Windows 11 version 21H2 (OS Build 22000.1098)

--
Enan
https://www.github.com/3N4N

GPG Key ID: 448F8D0D0D6DB601566E396CA031EA10A3ECB75D

Bram Moolenaar

unread,
Oct 15, 2022, 6:48:49 AM10/15/22
to vim...@googlegroups.com, Enan Ajmain

> Ex-commands like `:!dir` is spawning a console, upon which the external
> command is being executed and the result is being shown. Afterwards,
> both the external console _and_ gVim each presents a Press Enter prompt.
>
> I haven't used gVim before. Not more than a cursory glance anyway. I was
> wondering if this is the intended behavior or if I have garbled
> something while building it.
>
> VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Oct 15 2022 15:20:35)
> MS-Windows 64-bit GUI version
> Included patches: 1-733
>
> Windows 11 version 21H2 (OS Build 22000.1098)

This is intended, because executing a console command only works
properly in a console window. However, since the terminal window has
been added to Vim, you can add the "!" flag to 'guioptions' to execute
the command in a terminal window instead. How well this works depends
on what command you execute.

--
Lose weight, NEVER Diet again with
The "Invisible Weight Loss Patch"
(spam e-mail)

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Enan Ajmain

unread,
Oct 15, 2022, 10:20:41 AM10/15/22
to vim...@googlegroups.com
On Sat, 15 Oct 2022 11:48:33 +0100
Bram Moolenaar <Br...@moolenaar.net> wrote:

> This is intended, because executing a console command only works
> properly in a console window. However, since the terminal window has
> been added to Vim, you can add the "!" flag to 'guioptions' to execute
> the command in a terminal window instead. How well this works depends
> on what command you execute.

O wow! Works fine for small tasks. Which is what I aim to use the bang
for anyway. Thanks for the note.


--
Enan
Reply all
Reply to author
Forward
0 new messages