Questions tagged [copy-paste]

48 questions
202
votes
9 answers

Copy text from one tmux pane to another (using vim)

I have two files opened in vim, each in one tmux pane. I would like to copy let's say 10 lines from one file to another. How can I accomplish this not using the mouse's Copy -> Paste ?
Patryk
  • 13,556
  • 22
  • 53
  • 61
98
votes
5 answers

Pasting X selection (not clipboard contents) with keyboard

I'd like to be able to paste the X selection using the keyboard. Currently I have to use the middle mouse button to do this. I gather that faking a middle mouse button press is fairly easy to do, but such a solution would also require moving the…
intuited
  • 3,488
  • 3
  • 25
  • 36
83
votes
4 answers

Copy file to xclip and paste to Firefox

I'm coping file to xclip cat file.txt | xclip I'm pasting without problem with xclip -o When I want to paste it to Firefox with Ctrl+V it pastes old text (that shouldn't already be in the clipboard). When I go back to terminal and run xclip -o it…
xralf
  • 16,149
  • 29
  • 101
  • 149
55
votes
10 answers

Easy way to paste command line output to paste bin services?

Are there any command line tools on Linux that allow you to post output from commands or text files directly to a sharing service such as pastebin.com?
slm
  • 363,520
  • 117
  • 767
  • 871
38
votes
11 answers

Copy/paste into SSH'd VIM from local (Windows) clipboard

I would like to copy from a local machine and paste into vim on a remote box which I am SSH'd into. That's it. I have tried "+p and "*p, mouse middle-clicking, and a couple other things to no avail :( Also acceptable (though less convenient) is to…
frickskit
  • 519
  • 1
  • 4
  • 6
34
votes
2 answers

How to use keyboard instead of mouse middle-click for copy/paste?

Possible Duplicate: Pasting X selection (not clipboard contents) with keyboard Is there a shortcut for copy-paste under X? I'd like to use the keyboard for pasting.
Bastl
  • 349
  • 1
  • 3
  • 3
26
votes
7 answers

Terminal - copy from CLI without using mouse

While firing commands in CLI, I want to copy the command I just fired or anything I wrote in terminal and paste it somewhere else without using mouse. Like in following picture, I want to copy the update command (completely or partially) without…
prayagupa
  • 4,797
  • 12
  • 32
  • 38
18
votes
7 answers

How can I copy/paste data to and from the Windows clipboard to an OpenSuse clipboard using VNC?

I am connecting to a remote OpenSuse computer using VNC from Windows. On other Linuces that I've used over VNC, I can copy text between the remote machine and the local Windows machine using the clipboard. In this case, I can seem to connect the…
Nathan Fellman
  • 667
  • 4
  • 8
  • 14
17
votes
3 answers

Copy and paste a file/directory from command line

Instead of using the following command: cp {source file} {dest file} I want to be able to copy a file into the clipboard, and paste it somewhere else, in another directory. something like this: /usr/local/dir1# cp {source file} /usr/local/dir1#…
B Faley
  • 4,213
  • 11
  • 37
  • 48
17
votes
7 answers

How to copy multi-page text from the terminal into the clipboard?

I was viewing a man page for a software on my machine and I needed to copy-paste some of that text but the text was much more than one page. I'm aware I can direct the output to a file and use UI based software such as gedit to copy the text I need.…
Muhammad Gelbana
  • 1,583
  • 8
  • 19
  • 25
15
votes
2 answers

How to target multiple selections with xclip

When copying text to the clipboard, xclip provides several selection targets: -selection specify which X selection to use, options are: "primary" to use XA_PRIMARY (default), "secondary" for XA_SECONDARY "clipboard" for…
Amelio Vazquez-Reina
  • 40,169
  • 77
  • 197
  • 294
12
votes
4 answers

Emacs command to cut OR copy to system clipboard?

As a very new Emacs user, I've been using Ctrl+w and Ctrl+y to cut/copy and paste between buffers in Emacs. Is there a way to do the same thing so that not just Emacs, but the entire system, can have access to what I am copying and pasting?…
hpy
  • 4,517
  • 8
  • 53
  • 73
12
votes
2 answers

vim auto indenting even after setting noai option

I am using vim 7.2 from putty terminal. Even if I run set noai it seems vim still trying to indent code. I am copying my code from Notepad++ to vim. following is from Notepad++ and following what I got in vim: I don't have any tab in my file. As a…
Hemant
  • 6,834
  • 5
  • 38
  • 42
11
votes
1 answer

vi[m] read range of lines from another file

On Linux, editing file_B in vim I want to add line 10-25 from file_A. Example: One has a whole set of HTML-Documents with quite the same header and yes, one could create a template and start from there, but still: I am looking for a simple [and…
erch
  • 4,890
  • 17
  • 49
  • 81
11
votes
1 answer

A real non-"better touch tools" solution for select-to-copy on Mac OS X

I recently moved to Mac. I am missing my X11 copy-paste style. I can't find a way to exactly emulate X11 behavior "select-to-copy", "middle-click-to-paste" globally on Mac OS X. I am aware that this issue has been around for a long time, yet I…
Bichoy
  • 3,056
  • 2
  • 19
  • 33
1
2 3 4