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