Questions tagged [os-clipboard]

Questions about interfacing with the system's clipboard.

Filter by
Sorted by
Tagged with
1
vote
0answers
26 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
0answers
30 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 ...
0
votes
2answers
42 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 ...
3
votes
1answer
95 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 ...
0
votes
2answers
94 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. ...
0
votes
1answer
19 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?
0
votes
0answers
44 views

Vim and Gnome Clipboard indicator not working together

Update: Bug report 4217 has been opened regarding this issue. I cannot get the X11 / Gnome Clipboard to paste into vim/gVim 8.0.1453 under Ubuntu 18.04 with Gnome 3.26 installed when using the Gnome ...
1
vote
0answers
38 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 ...
0
votes
0answers
13 views

How do I get vim-gnome on Mac to enable copying to clipboard? [duplicate]

I am trying to enable copying to clipboard on mac using vim. Apparently vim normally does not come with this feature (and vim-gnome does). How do I get vim-gnome for mac to enable copying to clipboard?...
1
vote
0answers
22 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
143 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 ...
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
98 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. ...
1
vote
2answers
196 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?
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 ...
0
votes
3answers
199 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?
3
votes
1answer
1k 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?
4
votes
1answer
918 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 ...
1
vote
1answer
70 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 ...
7
votes
3answers
463 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 ...
2
votes
1answer
1k 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
28 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.
9
votes
3answers
3k 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
0answers
609 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. ...
0
votes
2answers
62 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
386 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>...
4
votes
2answers
214 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
1answer
176 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
149 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
288 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. ...
0
votes
1answer
81 views

What is clipbrdDefaultReg

Taken from here: https://stackoverflow.com/a/171558 What does let g:clipbrdDefaultReg = '+' mean?
2
votes
2answers
1k 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
93 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 ...
0
votes
1answer
134 views

How can I get more features?

My vim version is "huge" without GUI. Nevertheless, it is missing a lot of features like clipboard and python. How can I get a more full-featured version? I read that there is a version vim-nox which ...
2
votes
1answer
3k 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 ...
3
votes
0answers
202 views

Is there a content length limit on the selection and drop register "+?

When selecting about two dozens of lines in vim and copying it to the system register ("+ y), and then paste it into another vim, it crashes. It does not paste the content of the register and the ...
5
votes
1answer
165 views

How to disable the clipboard being overwritten when highlighting text in visual block mode?

Say I've got a URL in the clipboard, I enter vim, I hit <C-Q> and highlight a word. Then I hit I<C-R>+ to insert the clipboard at the start of the selection. What actually happens is the ...
6
votes
0answers
76 views

Prevent gvim from clearing the clipboard on exit [duplicate]

If I copy text into the xterm clipboard ("+y) from gvim, it is cleared when I exit gvim. How do I prevent this? I've found the solution for vim, but it doesn't work for Gvim: autocmd VimLeave * ...
5
votes
1answer
2k views

What's the difference between the “clipboard” and “xterm_clipboard” features?

What is the difference between the clipboard and xterm_clipboard features? When do I need to enable one or the other at compilation time? As an aside, how do these features relate to the mouse ...
3
votes
1answer
2k views

Can't yank into * or + registers [duplicate]

I'm trying to yank to the system clipboard on Ubuntu 14.04. I can't yank into the + or * registers, though. Every time I visually select my text and type "*y or "+y the indicator on the bottom right ...
0
votes
2answers
534 views

Vim is polluting clipboard with netrw_dirhist stuff

Every time I launch vim I have this in clipboard: let g:netrw_dirhistmax =10 let g:netrw_dirhist_cnt =8 let g:netrw_dirhist_1=... let g:netrw_dirhist_2=... let g:netrw_dirhist_3=... let g:...
-4
votes
1answer
134 views

How does one change the name of the clipboard register?

I initially posted a question assuming there was something to type that would signal append other than just using upper-case letters. How does one append to the clipboard register in vim? ...
5
votes
1answer
729 views

Can Vim add to the X11 clipboard or primary buffers without an external utility?

We can copy to both the + and * registers, but this doesn't actually copy the content to X's memory (apparently). If you copy something from Vim using the * or + registers and quit Vim, poof! There's ...
7
votes
1answer
1k views

Copy the full path of current buffer to clipboard

Is there a quick way to copy the full path of current buffer to system clip board or some register? :put=expand('%:p') then use other copy commands(like dd) works but the typing is a little long.
5
votes
1answer
3k views

Compiling vim from source just enabling clipboard

I have a Debian 7.0 with gnome, and I am fully satisfied with the standard vim version installed on it, except for the lack of +clipboard and/or +xterm_clipboard. I got the sources using mercurial, ...
6
votes
1answer
667 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 ...
11
votes
1answer
11k 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 ...
4
votes
3answers
567 views

Is it possible to wrap characters around text every time you paste something from the system clipboard?

I am going to be pasting a lot of characters into a file. Each time I paste something, the pasted element will need to be wrapped in quotes and followed by a comma. Is there a way to automatically ...
17
votes
1answer
5k views

How do I get +clipboard support in Fedora 20?

It seems to me that neither "+p nor "*p works for me. How can I know if my Vim is installed and set up properly to make them available? And if it's not set up, what can I do to set it up? I'm running ...
7
votes
1answer
242 views

Can visual select mode be integrated with the Unix selection clipboard?

Is it possible to configure vim (obviously with :set mouse=a) and/or gvim such that the visual selection modes automatically integrate with X's selection buffer? I am aware of how to setup the copy ...