I am using ZOC, used Windows CMD as well, the same thing, when I highlight the text using VIM and run command like "+y
or "*y
, and then, try to paste in my Windows local editor, the output is blank, which makes me thinking, that the highlighted text has not being copied/delivered to the system clipboard through the SSH connection...
Similarly, the "+p
is not pasting the clipboard contents from system clipboard..
System Info:
pi@readonly:~/new$ vi --version | grep IMproved
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Sep 30 2017 18:21:38)
pi@readonly:~/new$ vim --version | grep clipboard
+clipboard +job +path_extra +user_commands
+eval +mouse_dec +statusline +xterm_clipboard
pi@readonly:~/new$
When I open any file in VIM, and try to check for the register +
, I am getting this:
:reg +
--- Registers ---
Press ENTER or type command to continue
Also, when I run :echo has('clipboard')
, I am getting 1
@PatrickBacon, I have yanked the highlighted text by clicking on v
, scrolling through the text and using "+y
. Here are the registers showing:
:reg
--- Registers ---
"" int c;^J for (i = 0; i < sizeof(s) - 1 && (c = getchar()) != EOF;) {^J s[i++] = c;^J if (c == '\n
"0 int c;^J for (i = 0; i < sizeof(s) - 1 && (c = getchar()) != EOF;) {^J s[i++] = c;^J if (c == '\n
"1 ^J
"2 ^J
"3 p^J
"4 ^J
"5 ^J
"6 p^J
"7 p^J
"8 char s[64];^J size_t i;^J
"9 int atoi(const char *s) {^J int n = 0;^J size_t i = 0;^J^J while (s[i] == '0')^J i++;^J if (s[i]
"r while (s[i] >= '0' && s[i] <= '9')^J n = 10 * n + (s[i++] - '0');^J
"u size_t i = 0;^J^J while (s[i] == '0')^J i++;^J if (s[i] >= '1' && s[i] <= '9') {^J n = s[i++
"z t main() {^J char s[64];^J size_t i;^J int c;^J
"- i
"% t.c
Press ENTER or type command to continue
Hence, it looks like the yanking is working within vim..
Questions:
1) What else I should check to verify, that all the requirements for "Copying highlighted in VIM text into the remote system clipboard" have been met?
2) Do the registers that exist within VIM, are the real files in some directories in my Linux, buffered?
3) How does the remote system clipboard looks like to the Linux system, to which I am connecting via SSH? In other words, does the remote system clipboard is simply the STDOUT file or part of it, on the Linux?
system clipboard
in Unix/Linux. There are clipboards and copy buffers in X Windows. – phd