vim with gui in windows

95 views
Skip to first unread message

Igor Spiridonov

unread,
Jul 23, 2022, 5:30:41 PM7/23/22
to vim_use
Hi.
I want to use a console vim and use guioptions. In Linux i can run vim-gtk -v to run gui vim in tui. In windows -v still opens gvim in a separate window. Is there a way to do what i want?

Gary Johnson

unread,
Jul 24, 2022, 3:43:49 AM7/24/22
to vim_use
Strictly speaking, you can't use guioptions in a non-GUI (i.e.,
terminal or console) Vim because it has no GUI.

In Linux, a single Vim binary can be run in either mode because
Linux allows that. In Windows, the GUI and non-GUI versions must be
different binaries.

Whether there is a way to do what you want depends on what you want.
In Windows, you can run the non-GUI version by executing "vim", and
the GUI version by executing "gvim".

Is there some specific feature you want in Windows that your gvim
has and that your vim does not?

Regards,
Gary

Igor Spiridonov

unread,
Jul 24, 2022, 5:42:14 AM7/24/22
to vim_use
Thank you Gary for the answer.
I would like for example to have "Visual selection automatically copied to the clipboard." in windows as it is described here - https://vim.fandom.com/wiki/Easy_pasting_to_Windows_applications.
Console vim cannot provide it because it works only when gui is enabled.
Btw, what is the difference between linux and windows so that first allows to run gui wim in a terminal but second doesn't?

Regards,
Igor.


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20220724074407.GH12539%40phoenix.

Gary Johnson

unread,
Jul 24, 2022, 8:06:36 AM7/24/22
to vim_use
On 2022-07-24, Igor Spiridonov wrote:
> Thank you Gary for the answer.
> I would like for example to have "Visual selection automatically copied to the
> clipboard." in windows as it is described here - https://vim.fandom.com/wiki/
> Easy_pasting_to_Windows_applications.
> Console vim cannot provide it because it works only when gui is enabled.

Got it. I think this mapping will get you what you want.

:noremap <LeftRelease> <LeftRelease>y

I found it under ":help <MiddleRelease>".

I never use Vim in a Command Prompt window, but I tried it to verify
that that works, and it did for me with my vimrc. You might have to
use this instead to explicitly yank to the * register.

:noremap <LeftRelease> <LeftRelease>"*y

> Btw, what is the difference between linux and windows so that first allows to
> run gui wim in a terminal but second doesn't?

I don't know exactly. This may be an oversimplification, or just
wrong--I hope someone who knows can chime in here--but as
I understand it, the Windows console interface is totally different
from its GUI interface--so much so that the two kinds of programs
must be compiled with different, incompatible libraries, and must be
launched differently by the OS. With Linux, on the other hand, all
programs look alike from the OS perspective when they are launched.
Each program chooses whether to, or when to, use the services of the
X Window System (X11 or just X) or Wayland to use a GUI interface.

Regards,
Gary

Stan Brown

unread,
Jul 24, 2022, 10:21:38 AM7/24/22
to vim...@googlegroups.com
On 2022-07-24 01:40, Igor Spiridonov wrote:
> I would like for example to have "Visual selection automatically copied
> to the clipboard." in windows as it is described here -
> https://vim.fandom.com/wiki/Easy_pasting_to_Windows_applications
> <https://vim.fandom.com/wiki/Easy_pasting_to_Windows_applications>.
> Console vim cannot provide it because it works only when gui is enabled.

Does "*y not work for you? It does for me, when running vim (not gvim)
in a command window in Windows 10. (I have actually mapped ^C
(control+C) to "*y so that Ctrl+C behaves the same in Windows GUI
applications and in command-prompt Vim.)

My Vim is 7.4, but Id be awfully surprised if that stopped working in
later versions.

Stan Brown
Tehachapi, CA, USA
https://BrownMath.com

Igor Spiridonov

unread,
Jul 25, 2022, 6:07:04 AM7/25/22
to vim_use
Thanks Gary, nice workaround! Just "y" is enough because I have "set clipboard=unnamed" which copies to a clipboard by "y".
Mouse selection works although keyboard one has some problems. Keyboard selection might be also adjusted in a similar way but it is not so important for me.

Stan: "*y works but i'd like to copy to the clipboard only by selection.

Igor.


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages