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
46
votes
2 answers

How can vim keep the content of register when pasting over selected text?

I have a line of text I have yanked yy. Now I want to use this text to replace lines at several other places. The trouble is that when I select V the line to be replaced, and paste p, the text that was selected is automatically yanked! That's what I…
Didier Trosset
  • 36,376
  • 13
  • 83
  • 122
45
votes
8 answers

Copy to clipboard with jQuery/js in Chrome

I know this kind of question has been asked here for many times, including: How do I copy to the clipboard in JavaScript? or How to copy text to the client's clipboard using jQuery?, I'm narrowing the scope: Condition: works fine in Google Chrome…
Sam Su
  • 6,532
  • 8
  • 39
  • 80
44
votes
1 answer

Copy lines in visual mode in vim

Just a question about copy/paste workflow in gVim. Right now I'm working on a document. I want to select some lines of code and copy and paste. I'm using gVim (Windows). If I use Control + C and Control + V, gVim takes sometimes 2, 3 seconds to…
homemrobo
  • 565
  • 1
  • 5
  • 7
44
votes
11 answers

Wysiwyg with image copy/paste

First, I understand that an image cannot be "copied" from a local machine into a website. I understand that it must be uploaded. I am a web programmer, and am familiar with common web wysiwyg tools such as TinyMCE and FCKEditor. My question is if…
jW.
  • 9,280
  • 12
  • 46
  • 50
44
votes
4 answers

Python: Catch Ctrl-C command. Prompt "really want to quit (y/n)", resume execution if no

I have a program that may have a lengthy execution. In the main module I have the following: import signal def run_program() ...time consuming execution... def Exit_gracefully(signal, frame): ... log exiting information ... ... close…
Colin M
  • 441
  • 1
  • 4
  • 3
43
votes
13 answers

How to disable Excel's automatic cell reference change after copy/paste?

I've got a massive Excel 2003 spreadsheet I'm working on. There are a lot of very large formulas with a lot of cell references. Here's a simple example. ='Sheet'!AC69+'Sheet'!AC52+'Sheet'!AC53)*$D$3+'Sheet'!AC49 Most of them are more complicated…
Bat Masterson
  • 1,164
  • 3
  • 11
  • 27
42
votes
6 answers

How to copy watched javascript variable in Chrome?

I put a breakpoint in javascript and am testing some code with Chrome. I also added a watch expression for the value. Chrome breaks at the breakpoint and shows the value. However the value is very long, and it doesn't display it all. I move the…
siamii
  • 23,374
  • 28
  • 93
  • 143
39
votes
3 answers

Copy text to clipboard: Cannot read properties of undefined reading 'writeText'

I have a button When I clicked on COPY copyImageLinkText({ mouseenter, mouseleave }, e) { this.showCopiedText = !this.showCopiedText navigator.clipboard.writeText(this.imageLink) clearTimeout(this._timerId) mouseenter(e) this._timerId =…
code-8
  • 54,650
  • 106
  • 352
  • 604
39
votes
7 answers

Copy Paste Values only( xlPasteValues )

I'm trying to copy entire column in sheetA to Sheet B. sheetA column has values formed with formuls. I'm copying SheetA column values only using xlPasteValues. But it is not paste the values to another sheetB. The column in sheetB is empty. My VBA…
sam
  • 935
  • 3
  • 17
  • 29
39
votes
5 answers

Can I get copy/paste functionality from a C# Console Window?

I am developing a console application in C#, and was wondering if there was a way to get the "copy-paste" or "mark-paste" functionality into my application, similar or identical to that of the standard Windows command prompt. Is this a wild goose…
Simpleton
  • 1,201
  • 3
  • 13
  • 16
37
votes
5 answers

Prevent ID autogeneration on copy-paste in Visual Studio 2008 ASP.NET Web Form

If I have the following in an ASP.NET Web Form: and I copy and paste that line in the same page, I usually get the following: Obviously, nobody is going to name…
Diego
  • 5,024
  • 6
  • 38
  • 47
35
votes
15 answers

How to convince a colleague that code duplication is bad?

A colleague of mine was implementing a new feature in a project we work on together and he did it by taking a file containing the implementation of a similar feature from the same project, creating a copy of it renaming all the global declarations…
vitaut
  • 49,672
  • 25
  • 199
  • 336
33
votes
8 answers

CITRIX and disabled "Copy/Paste"

I must use several Citrix desktops, where "COPY/PASTE" from the local machine to the server is disabled. Are there workarounds or tricks to bypass this limitation?
Kottan
  • 4,944
  • 9
  • 41
  • 67
33
votes
4 answers

Visual-Block mode not working in Vim with C-v on WSL@Windows 10

I use WSL Ubuntu and Vim inside the new Windows Terminal, but if I have to enter the visual-block mode with C-v, I can't since it acts as paste. I am okay with rebinding it to something else but I don't happen to have found the command that I have…
lnk3
  • 513
  • 1
  • 4
  • 6
33
votes
5 answers

Visual Studio multiple copy and paste

While editing and fixing up code I have thought that sometimes it would be nice to be able to paste more than one thing at a time. For instance I was fixing up some WCF Rest code and I wanted to paste "Xml" sometimes and "Json" other times. These…
Telavian
  • 3,752
  • 6
  • 36
  • 60