Questions tagged [paste]

The paste tag is to be used for issues relating to the paste portion of copy/paste operations.

Cut and paste and copy and paste offer user-interface paradigms for transferring text, data, files or objects from a source to a destination. The paste operation performs the copy to destination, whereas the source is often a clipboard. Often, hotkeys are employed to provide the paste functionality.

2546 questions
257
votes
26 answers

Eclipse copy/paste entire line keyboard shortcut

Anyone know the keyboard shortcut to copy/paste a line into a new line in Eclipse, without having to highlight the entire line? ctrl-alt-down turns my whole screen upside down (I'm on windows). Interestingly, that's what's specified in the…
Prabhu
  • 12,995
  • 33
  • 127
  • 210
218
votes
17 answers

Catch paste input

I'm looking for a way to sanitize input that I paste into the browser, is this possible to do with jQuery? I've managed to come up with this so far: $(this).live(pasteEventName, function(e) { // this is where i would like to sanitize my input …
Christoffer Winterkvist
  • 3,074
  • 2
  • 19
  • 14
205
votes
13 answers

Combine several images horizontally with Python

I am trying to horizontally combine some JPEG images in Python. Problem I have 3 images - each is 148 x 95 - see attached. I just made 3 copies of the same image - that is why they are the same. My attempt I am trying to horizontally join them…
edesz
  • 11,756
  • 22
  • 75
  • 123
160
votes
4 answers

Get current clipboard content?

I'd like to know a way to make my script detect the content of the clipboard and paste it into a text field when the page is opened, with no input from the user. How can it be done?
kettlepot
  • 10,574
  • 28
  • 71
  • 100
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
139
votes
13 answers

How do I paste multi-line bash codes into terminal and run it all at once?

I need to paste a multi-line bash code into terminal, but whenever I do, each line gets run as a separate command as soon as it gets pasted.
Nathan
  • 1,393
  • 2
  • 9
  • 4
125
votes
11 answers

Paste multiple columns together

I have a bunch of columns in a dataframe which I want to paste together (seperated by "-") as follows: data <- data.frame('a' = 1:3, 'b' = c('a','b','c'), 'c' = c('d', 'e', 'f'), 'd' =…
user1165199
  • 6,351
  • 13
  • 44
  • 60
122
votes
10 answers

Replace word with contents of paste buffer?

I need to do a bunch of word replacements in a file and want to do it with a vi command, not an EX command such as :%s///g. I know that this is the typical way one replaces the word at the current cursor position: cw but is there a way to…
plong
  • 1,723
  • 3
  • 14
  • 14
115
votes
7 answers

Paste multiple times

What is the best way replace multiple lines with the contents of the clipboard? The problem I'm having is when I yank a line and paste it over another line the "yank" is replaced with the line I just replace. Now, if I want to replace another line…
jwerre
  • 9,179
  • 9
  • 60
  • 69
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
81
votes
5 answers

how to paste to vim when using putty

I am using putty to connect a remote host and editing via vim. I meet a trouble when I try to paste something to vim. That's, I copy something to clipboard in my local host and want to paste it to the vim in the remote host. How to do that? ps: I am…
dj199008
  • 1,739
  • 3
  • 18
  • 27
73
votes
6 answers

Notepad++ How do I insert a column of data?

So I am trying to take a column of text data and replace that data with edited information. I am trying to manipulate values in a fixed width file. I want to leave the rows intact. I know I can hold ALT and select a whole column of information but…
user2871554
  • 731
  • 1
  • 5
  • 3
66
votes
14 answers

How to disable pasting in a TextField in Swift?

I've got a TextField with a numberPad and the function runs only if it contains numbers. The user will crash the app if they paste letters in the TextField and click OK. How can I disable pasting in the TextField?
Eliko
  • 851
  • 2
  • 7
  • 9
65
votes
3 answers

How to paste a string on each element of a vector of strings using apply in R?

I have a vector of strings. d <- c("Mon","Tues","Wednes","Thurs","Fri","Satur","Sun") for which I want to paste the string "day" on each element of the vector in a way similar to this. week <- apply(d, "day", paste, sep='')
pedrosaurio
  • 4,708
  • 11
  • 39
  • 53
65
votes
2 answers

Is there a way to paste together the elements of a vector in R without using a loop?

Say there's a vector x: x <- c("a", " ", "b") and I want to quickly turn this into a single string "a b". Is there a way to do this without a loop? I know with a loop I could do this: y <- "" for (i in 1:3){ paste(y, x[i], sep = "") } > y [1]…
Max
  • 805
  • 1
  • 6
  • 9
1
2 3
99 100