Questions tagged [os-clipboard]

Questions about interfacing with the system's clipboard.

Filter by
Sorted by
Tagged with
1
vote
1answer
46 views

Disable Shift+Insert from pasting from Primary

In Vim, the canonical methods to interact with X11's Clipboard and Primary is to use + and * registers. There are at least another two ways to paste from Primary into Vim: Shift-Insert and Mouse ...
0
votes
2answers
36 views

no + or * register when entering vim from ranger

I'm running Ubuntu 18.04 with i3wm. Vim and vim-gtk3 packages are installed. If I'm in a regular terminal and I start editing a file in vim. I can yank text to the + register as expected. However, if ...
3
votes
1answer
224 views

unable to copy to system clipboard with +clipboard and +xterm_clipboard in vimx

The system is Centos7.2. I have installed vim-enhanced and vim-X11, used vimx command. It shows that vimx supports clipboard and xterm_clipboard. But in vimx, there is no reg + and reg *. I can't ...
1
vote
0answers
42 views

No + or * register on Linux (accessed via SSH from macOS)? [duplicate]

I am on Ubuntu 14.04.3 and Vim 8.2. I'm trying to figure out how to access either the * or + clipboard on Ubuntu but it seems like it doesn't exist? After doing "*yy and "+yy on lines of ...
1
vote
0answers
49 views

Vim adding blank line after each line when pasting from clipboard

When I copy-paste multiple lines from clipboard into my vim, it inserts a blank line after every line. But when I copy in into a text editor first and then copy-paste it into vim, the blank lines are ...
0
votes
1answer
49 views

How can I put the system clipboard into a vim register?

Basically the opposite of this question. This is on macOS. I copy from a program using ⌘C and I want to add that text to "" or "0 so when I cw or something similar I don't obliterate my copied text. ...
363
votes
12answers
360k views

How can I copy text to the system clipboard from Vim?

Is there a way to copy a block of text to the system clipboard, so I can paste it in another program?
2
votes
4answers
117 views

Clipboard is reset after first paste in Visual Mode

I am on Neovim. This is really annoying and weird. When I make a selection in Visual Mode and copy, then select a text and then paste, this paste only works once. For the next time, I again have to ...
1
vote
2answers
56 views

Why does <F22> appear when pasting into Vim?

I want to paste some text into Vim in GNOME Terminal on Ubuntu 20.04. Before doing that, I run: :set paste I use that so that autoindent and other Vim features don't change the text that I am ...
1
vote
1answer
56 views

Can't copy special characters outside of vim

I'm using NVIM v0.4.3 with set clipboard=unnamed. I can insert special character like üäö in vim just fine, but if I copy content containing special characters in vim and try to paste them outside of ...
1
vote
1answer
43 views

How to automatically perform a command after yanking text [Vim wayland clipboard]

I want to copy contents of the recently used " register automatically into my system clipboard after a yank command. The way I achieve this now is by nnoremap <C-@> :call system("wl-copy", @")&...
2
votes
1answer
100 views

copy-paste selection locally when editing files on remote headless server

When connected to a remote headless Linux server via SSH, I want to be able to do 3 things: select text using the mouse and copy the selection into my local X clipboard paste from local X clipboard ...
2
votes
1answer
41 views

Copying to unnamedplus doesn't work across instances

Whenever I copy with "+y it only works for the instance of vim I am running and I would expect it to write to my system clipboard, that I can access both outside of vim and from other vim instances. ...
1
vote
0answers
856 views

Unable to copy to system clipboard

I'm running vim on a Debian Jessie machine inside of a VirtualBox on my Mac. I'm trying to get yy and p to work so I can copy and paste across different terminal windows by using the system clipboard. ...
5
votes
1answer
6k views

How can I copy over an ssh session without +clipboard?

On my local computer, I have the following in ~/.vimrc, which allows me use to the mouse (e.g. to select text) and to copy to the system clipboard with Ctrl+c. set mouse=a vnoremap <C-C> "+y ...
9
votes
2answers
601 views

Difference between “* and ”+ registers in +clipboard VIM?

"*p and "+p seem to behave the same. I tried :help "*, but it's talking about mouse selection, and :help "+ tells me There are three documented X selections: PRIMARY (which is expected to ...
4
votes
0answers
18 views

How to copy text to X primary selection only when visual mode is started with the mouse?

At the moment, if I use Visual mode, whenever I select a block of text using the keyboard it ends up on my X primary selection (ie the clipboard that is filled using the mouse). Even if I just select ...
1
vote
2answers
302 views

How to start gvim from command line with predefine pasting from clipboard

I know gvim -c [command] samaple.txt might run command predefined in command body. How to paste text from windows clipboard at the end of sample.txt file?
1
vote
2answers
111 views

How can I edit the contents of my clipboard in vim?

Often while editing (say, a post on this network), I find myself wanting to copy something, edit it, and paste it back. At other times, I have some text in my clipboard, but isn't perfect. I would ...
1
vote
0answers
63 views

Pasting non-text data (image) from system clipboard [closed]

I would like to write a plugin which will be triggered at paste from system clipboard if it contains image data. Is it feasible to do this with scripting? My preference is to write in Python, using ...
0
votes
2answers
1k views

Make vim support the Windows clipboard

I've found a lot of information online about this for Linux-Vim but not for the Windows-Vim (not gvim). Whenever I try to copy and paste something in Vim (using y and p), the copies I make do not ...
0
votes
2answers
504 views

how could I enable vim clipboard with sudo and x11 installed

I am given an account on a new server these days. The new server does not have x11 install, neither do I have sudo. So I cannot install system packages, and I cannot compile with the option -with-x. ...
4
votes
1answer
202 views

Vi: * and + registers do not exist

I'm unable to use the system clipboard in Vim. I'm using ssh to connect to an EC2 instance running Ubuntu 18.04. I'm fairly sure that this has to do with neither the * or the + register showing up in ...
12
votes
3answers
5k views

Vim on WSL: synchronize system clipboard? (set clipboard^=unnamed)?

While using WSL/Bash for Windows I want to be able to use y yy 3y and p the same way they always work in vim, but connecting to the system clipboard shared by all apps, not to vim's internal clipboard....
1
vote
1answer
34 views

Can you run a regex on a register or the clipboard contents?

I want to copy something to a register or more ideally the system clipboard and then run a search / replace regex on it the way that I do in the buffer...is that possible?
1
vote
0answers
50 views

Sharing a copy register between vim on different machines?

The image below shows two terminals. Both are running vim instances on remote machines (ssh and a serial connection through an UART cable). Vim's on those machines don't have a way to access the ...
3
votes
1answer
2k views

Neovim Clipboard Selection

I am using neovim 0.2.3 dev and xfce4-clipman clipboard manager. I want to copy from the neovim into registers and put it into clipman register. How can I do that?
1
vote
0answers
24 views

Copy/paste across terminals in nvim? [duplicate]

How do you copy/paste a piece of text across different terminals in nvim (neovim)?
1
vote
1answer
340 views

Unable to use the clipboard when inside terminal (:term) on macOS

Actually, I am unable to do so when I am using MacVim Application. But inside iterm using Vim (the same MacVim release), I am able to. They also both use the same .vimrc . Both versions compiled ...
6
votes
1answer
1k views

Copying From Vim to Ubuntu Bash on Windows

Note: this question is specific to the relatively new Ubuntu Bash on Windows system. So it seems possible to paste into Vim from the Windows clipboard by simply right clicking in insert mode after ...
0
votes
1answer
39 views

Why aren't the lines copied into my system register?

My copy of Vim has the +clipboard feature compiled in: vim --version | grep clipboard +clipboard +job +path_extra +user_commands +eval +mouse_dec +statusline ...
1
vote
2answers
165 views

Overwrite buffer with system clipboard by ex command

I'm trying to find the right ex command to overwrite the current vim buffer with the system clipboard. The relevant system clipboard register is "+ in this case. My first guess was to use :%+p; i.e. ...
0
votes
0answers
37 views

How to set system cut-buffer clipboard as default in vim? [duplicate]

I usually want to share my clipboard between vim and other applications (like a web browser) so that I can yank/paste the information easily. So questions, How do I set the default behavior of vim ...
4
votes
2answers
330 views

Install vim features

I have installed a tiny vim version without the clipboard feature. Can I load this feature for the current version or do I have to install another version of vim? $ vi --version VIM - Vi IMproved 7.4 ...
0
votes
3answers
316 views

How to transfer a register to the system clipboard?

If I store a value in a register in vim, is there a way I can transfer it to the system clipboard using a quick ex command? Or do I need to write a macro to do that?
1
vote
1answer
93 views

Any vim-plugin to access system clipboard on as many unix platforms as possible?

There are many question regarding this on SE and various solutions have been provided on how to access system clipboard on various platforms. I ssh to various machines and on some platforms, my ...
13
votes
1answer
17k views

How do I use the system clipboard with Vim in Arch Linux? [duplicate]

I am using Vim on Arch Linux through urxvt. Since there is no "Ctrl-V" or "Ctrl-Shift-V" support in urxvt, there is no way for me to paste things I have copied from my browser (let's say) into my vim ...
9
votes
3answers
1k views

Paste link to image in clipboard when editing Markdown

I have an image on the clipboard and I want to paste it into my document as the text [](img/image1.png). Instead of first copying it to that directory, I want to do it with a single p key press in ...
7
votes
6answers
6k views

How can I copy/paste new text without auto-indentation at every new line?

How I paste now: Right-click/Copy or simply highlight. Right-click/Paste or Middle Click or CTRL+SHFT+V Indents appear at increasing intervals: 0, 2, 4, 6, + Question at hand: From prior research, ...
3
votes
1answer
2k views

Not able to copy from terminal when using vim from homebrew on macOS

When using the vim installed by default in macOS 10.12.5, I can copy text from the terminal by using cmd-C and pasting it into another applications. But when I use the latest version of vim (8.0....
1
vote
0answers
30 views

Make yanking pipe into an external program [duplicate]

Is it possible to set up an external program as my clipboard? I'd like vim to pipe into it whenever I yank something.
0
votes
2answers
73 views

Explanation of command :'<, '>

(I'm really not sure how I would google this. Sorry if this has already been asked and please just link me in the right direction in that case) I'm using Vim in cygwin environment and marked a line ...
0
votes
1answer
618 views

Highlight word on double click and copy to clipboard

I am using this excellent solution by Peter Rinker to highlight all occurrences of a word on double clicking. nnoremap <silent> <2-LeftMouse> :let @/='\V\<'.escape(expand('<cword>...
1
vote
1answer
314 views

How to merge OS'es clipboard with Vim's one? [duplicate]

How can I merge OS clipboard and Vim's one? I want them to be the same, so that I don't have to use "*y or "*p or "*d, instead just y, or p or d. How can I do that?
0
votes
1answer
213 views

How do you paste what is in your highlight clipboard?

I want to map vv to paste my highlighted text clipboard as opposed to vim's clipboard or the copy clipboard. Is this possible?
0
votes
0answers
423 views

System clipboard not working via ssh [duplicate]

I work on a remote server and would like to yank stuff to the server's clipboard. However "+y gives me an error flash (visual terminal bell) and when quitting vim, I can't paste in the terminal. ...
6
votes
1answer
848 views

Clipboard sharing broke under MacOS X

I'm using (roughly) the same config for my mac and my ubuntu machine. I use set clipboard=unnamed,unnamedplus To conveniently share vim's clipboard with the system clipboard. However, lately the ...
0
votes
1answer
96 views

What is clipbrdDefaultReg

Taken from here: https://stackoverflow.com/a/171558 What does let g:clipbrdDefaultReg = '+' mean?
2
votes
2answers
2k views

Paste clipboard shortcut in vimrc

I know that I can paste the clipboard in by by typing ctrl-shift-v. The problem is that this is a very counterintuitive shortcut. It requires me to move my hand in a very uncomfortable way. I would ...
1
vote
1answer
100 views

Why does this clipboard manipulation that works on Vim not work on GVIM?

In my .vimrc I have this piece of code: " Gist it to bl.ocks.org {{{ let g:gist_clip_command = 'xclip -selection clipboard' command! -range=% Blocks \ <line1>,<line2>Format format | f ...