How to copy something from vim editor to shell command line

I am going to copy something from the vim editor to the shell command line. I tried many ways, but I believe that they all work only in the same vim editor. I need to copy and paste between the vim editor and the shell command line. This, vim -> shell

PS: I use putty.

EDIT:

By the way, what if you just copy something from the vim editor and paste it into the terminal like in unix / linux?

ATTENTION:

output: echo has ("X11") in vim is 0, so my system does not support X11!

+4
source share
3 answers

vim >= 7.3.74, vim , .vimrc:

set clipboard=unnamedplus

. . y (ank) vim, .

EDIT:
"* y" , Vim . , cat/grep/less/tail... , .

+3

, , *, vim, : 3 :

" * y

, , - , , .

:h y , ( *)

+2

" + yTo insert text into vim, then ctrl+ shift+ vto be inserted into the terminal.

+1
source

Source: https://habr.com/ru/post/1527168/


All Articles