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
117
votes
6 answers

Capturing Ctrl-c in ruby

I was passed a long running legacy ruby program, which has numerous occurrences of begin #dosomething rescue Exception => e #halt the exception's progress end throughout it. Without tracking down every single possible exception these each…
Tim Snowhite
  • 3,736
  • 2
  • 23
  • 27
110
votes
3 answers

How can I copy & paste, or duplicate, an existing project?

I've got an existing Hudson project that is configured and working. I need to duplicate the project so that I can have the original and then change the new one so that it points to a different source control. I don't want to manually recreate the…
Derick Bailey
  • 72,004
  • 22
  • 206
  • 219
108
votes
25 answers

Disable pasting text into HTML form

Is there a way using JavaScript to disable the ability to paste text into a text field on an HTML form? E.g. I have a simple registration form where the user is required to input their email twice. The second email entry is to verify there are no…
justinl
  • 10,448
  • 21
  • 70
  • 88
107
votes
6 answers

Paste an image from clipboard using JavaScript

How do we paste an image from clipboard into a custom rich text editor using javascript? (ctrl+c and ctrl+v or a snapshot). Has anyone used Ajax's rich text editor? Does pasting an image from clipboard to Ajax RTE work?
kani
  • 1,069
  • 2
  • 8
  • 6
107
votes
7 answers

Unable to copy/paste in MinGW shell

I just installed MinGW on Windows and I'm unable to copy/paste as I am used to on Linux or even PuTTY. What is the trick for copying and pasting text (e.g. from chrome) into MinGW shell?
user788171
  • 16,753
  • 40
  • 98
  • 125
99
votes
7 answers

vi/vim editor, copy a block (not usual action)

In vi/vim editor, I need to copy a block. There are many ways, but one way is very quick. label the first line by some way, then label the end line by some way, then put some command to copy the labeled lines. then copy, may using 'p', but not…
Yang
  • 1,285
  • 1
  • 10
  • 14
91
votes
10 answers

jQuery bind to Paste Event, how to get the content of the paste

I have a jquery token tagit plugin and I want to bind to the paste event to add items correctly. I'm able to bind to the paste event like so: .bind("paste", paste_input) ... function paste_input(e) { console.log(e) return false; } How…
AnApprentice
  • 108,152
  • 195
  • 629
  • 1,012
89
votes
9 answers

Copying a UTF-8 URL from browser's address bar, gives only the ugly encoded one

When I copy a UTF-8 URL from the browser's address bar (almost any browser on any os), then try to paste it in another text field (to post it on facebook or twitter for example), it gives only the decoded URL, which makes it ugly. For example, in…
AbdelHady
  • 9,334
  • 8
  • 56
  • 83
88
votes
11 answers

OpenClipboard failed when copy pasting data from WPF DataGrid

I've got a WPF application using datagrid. The application worked fine until I installed Visual Studio 2012 and Blend+SketchFlow preview. Now, when I'm trying to copy the data from the grid into the clipboard with Ctrl + C (in any application), I'm…
Arsen Zahray
  • 24,367
  • 48
  • 131
  • 224
87
votes
4 answers

How can I "intercept" Ctrl+C in a CLI application?

How can I intercept Ctrl+C (which normally would kill the process) in a CLI (command line interface) Java application? Does a multi-platform solution exist (Linux, Solaris, Windows)? I'm using Console's readLine(), but if necessary, I could use some…
85
votes
6 answers

Equivalent of ctrl c in command to cancel a program

I am running a long linux program in a remote machine, and I want to stop it, but my problem is that if I use the kill command then the program will exit without saving results. Normally what I do to finish the program is use Ctrl+C and in that case…
Eduardo
  • 19,928
  • 23
  • 65
  • 73
79
votes
11 answers

How to disable Paste (Ctrl+V) with jQuery?

How can I disable Paste (Ctrl+V) option using jQuery in one of my input text fields?
Misam
  • 4,320
  • 2
  • 25
  • 43
79
votes
27 answers

In Visual Studio Code Ctrl+V is not working

In Visual Studio Code Ctrl+V is not working on editor. However from the command palette Ctrl+Shift+V is working.
Ishwar Chandra Tiwari
  • 5,099
  • 6
  • 22
  • 41
77
votes
9 answers

How to copy the GNU Screen copy buffer to the clipboard?

When using GNU Screen we can work with scrollback buffer also known as "copy mode" using the Ctrl+a+[ command. In there we can copy text to the copy buffer by pressing space selecting the text and pressing space again. Is there some way to copy…
Samuel G. P.
  • 3,004
  • 2
  • 29
  • 36
77
votes
13 answers

How to copy and paste code without rich text formatting?

I used to often find myself coping a piece of code from a website/Word document etc only to discover that when doing Paste I would end up with the desired code plus some extra HTML tags/text, basically extra formatting information. To get rid of…
kristof
  • 52,923
  • 24
  • 87
  • 110