Questions tagged [copy-paste]

For issues relating to cut, copy, and paste operations.

The term "copy-and-paste" refers to the popular, simple method of reproducing text or other data from a source to a destination. It differs from cut and paste in that the original source text or data does not get deleted or removed. The popularity of this method stems from its simplicity and the ease with which users can move data between various applications visually – without resorting to permanent storage.

Source: Wikipedia

3477 questions
4346
votes
27 answers

How do I copy to the clipboard in JavaScript?

How do I copy text to the clipboard (multi-browser)? Related: How does Trello access the user's clipboard?
Santiago Corredoira
  • 47,267
  • 10
  • 52
  • 56
724
votes
36 answers

How do you copy and paste into Git Bash

I'm using msysgit running on Windows XP. Tried Ctrl+V, Right click, Middle click, google... no luck.
Trav L
  • 14,732
  • 6
  • 30
  • 39
704
votes
11 answers

How to paste yanked text into the Vim command line

I'd like to paste yanked text into Vim's command line. Is it possible?
dan
  • 43,914
  • 47
  • 153
  • 254
470
votes
25 answers

Paste text on Android Emulator

Is there an easy way to copy/paste (desktop's) clipboard content to EditView on Android Emulator? (just for the sake to ease development/test)
ankitjaininfo
  • 11,961
  • 7
  • 52
  • 75
453
votes
32 answers

How to Copy Text to Clipboard in Android?

Can anybody please tell me how to copy the text present in a particular textview to clipboard when a button is pressed? @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); …
331
votes
19 answers

Copy and paste content from one file to another file in vi

I am working with two files, and I need to copy a few lines from one file and paste into another file. I know how to copy (yy) and paste (p) in the same file. But that doesn't work for different files. How is this done? Also, is there a way to…
macha
  • 7,337
  • 19
  • 62
  • 84
279
votes
16 answers

Copying text outside of Vim with set mouse=a enabled

After enabling set mouse=a, text copied inside of Vim will not paste outside of Vim. Does anybody know of a way to fix this? Here, selecting text with the mouse turns on visual mode and disables the Copy option in the popup menu:
lyuba
  • 6,250
  • 7
  • 27
  • 37
252
votes
9 answers

How to delete (not cut) in Vim?

How can I delete a line without putting it into my default buffer? Example: line that will be copied. line that I want to be substitued with the previous one. What I'm trying to do: yy dd p But Vim replaces the recent copied string with the…
MaikoID
  • 4,359
  • 4
  • 25
  • 27
193
votes
1 answer

How to copy text to the client's clipboard using jQuery?

The workflow is simple: You click inside a textarea. The text is copied to the client's clipboard. Display notice to the user. How do you do it?
mager
  • 4,813
  • 8
  • 29
  • 30
167
votes
7 answers

How to paste text to end of every line? Sublime 2

I'm curious if there is a way to paste text to the end of every line in Sublime 2? And conversely, to the beginning of every line. test line one test line two test line three test line four ... Say you have 100 lines of text in the editor, and you…
Tony H.
  • 1,975
  • 4
  • 14
  • 20
154
votes
11 answers

How do I enable standard copy paste for a TextView in Android?

I want to enable standard copy paste for a TextView (the same as for EditText). How can I do it? I tried using a non-editable EditText but it didn't work well (sometimes it became editable or the copy paste overlay was not shown). And it's probably…
User
  • 31,811
  • 40
  • 131
  • 232
142
votes
12 answers

Getting strange characters when pasting into my iterm2 terminal

I'm using iterm2 v 3.0.15 on Mac Sierra. I'm having trouble cutting and pasting from other places (e.g. text on a web page) into my terminal. For instance, I highlight some text from a web page, press Command + C, go to the terminal, and then…
user7055375
138
votes
18 answers

Why is "copy and paste" of code dangerous?

Sometimes, my boss will complain to us: Why do we need such a long time to implement a feature? Actually, the feature has been implemented in another application before, you just need to copy and paste codes from there. The cost should be…
Yigang Wu
  • 3,596
  • 5
  • 40
  • 54
135
votes
5 answers

Detecting CTRL+C in Node.js

I got this code from a different SO question, but node complained to use process.stdin.setRawMode instead of tty, so I changed it. Before: var tty = require("tty"); process.openStdin().on("keypress", function(chunk, key) { if(key && key.name ===…
user3025492
  • 2,853
  • 4
  • 18
  • 19
127
votes
13 answers

How to copy text from Emacs to another application on Linux

When I cut (kill) text in Emacs 22.1.1 (in its own window on X, in KDE, on Kubuntu), I can't paste (yank) it in any other application.
memius
  • 4,045
  • 5
  • 26
  • 25
1
2 3
99 100