Tag Info

New answers tagged

4

You can actually do this with xclip. The secret is the -t option, which refers you to the ICCCM Section 2.6.2. Which I confess I don't blame you for failing to read... Anyway, an example, I have just right-clicked your avatar in Chromium and selected "Copy Image": See what targets are available: $ xclip -selection clipboard -t TARGETS -o TARGETS ...


0

As for the second part of your question where in you specified that when pasting from other applications to vim it adds tabs/spaces. Try adding this to your ~/.vimrc set paste or in vim before pasting in normal mode press "shift" + ":" and type "set paste"


1

If you have xterm_clipboard feature, you can use the * and + registers. These registers interface with the X11 primary selection buffer, and clipboard (respectively). Thus if you've copied something via CTRL+c, you can paste it in vim with "+p. If you've simply highlighted it without copying, you can paste it with "*p. You can also make the * buffer the ...


3

To save a lot of clipboard text to file quickly, you can run cat > file.txt, paste the contents, then press Ctrl-d. If you have xsel installed, you can do :r !xsel to insert the "primary" (aka. "mouse") selection in Vim, or :r !xsel -b to insert the "clipboard" (Ctrl-c) buffer. You can also save the selection directly to a file with xsel >file.txt or ...


1

One workaround is using (remotely accessed) scratch files to transfer the text: In case you can SSH back to your own system, you can just :split scp://hostname/path/to/file, put the yanked text there, and :write. If you can just use SSH from your system to the server box, open Vim locally and access the scratch file from the server: vim ...


2

mouse=a prevents the ability of copying and pasting out of vim with readable characters. Change mouse=a to mouse=r and that should fix your issue with that. one thing I am wondering is, are you changing the config file for your vim with the mouse set to mouse=a? orignal answer ^ If mouse=r doesn't give you all the copy past options change it to mouse=v ...


4

They are part of Selection Atoms, or X Atoms. The Inter-Client Communication Conventions Manual for X states: There can be an arbitrary number of selections, each named by an atom. To conform with the inter-client conventions, however, clients need deal with only these three selections: PRIMARY SECONDARY CLIPBOARD In short; PRIMARY ...



Top 50 recent answers are included