Questions tagged [yank]

yanking is the older word for copying a line to a clipboard. Use this tag to ask about how the command is working, or advanced combinations.

yanking is the older word for copying a line to a clipboard. This is favoured in UNIX text editors such as and . Use this tag to ask about how the command is working, or advanced combinations/commands which involve yanking several lines.

68 questions
1
vote
3 answers

Copy multiple lines and text until a space in VIM

I have to run a bunch of commands in a bash script and I want to echo which command is currently running: I have this file (which is about 100 lines): nohup command1 param1 param2 nohup command2 p1 p2 nohup cmd3 p1 p2 param3 I would like: echo…
Erik
  • 79
  • 1
  • 1
  • 10
1
vote
2 answers

Using Vim to cut and paste an element and move it to another line efficiently

so I am continuing my use off vim...I have this piece of html here:
  1. banner

user2405469
  • 1,953
  • 2
  • 22
  • 43
1
vote
1 answer

Why is the text font-face setting killed/copied along with the text?

The case I am presenting right here isn't reproducible everywhere in Emacs but the where I was able reproduce it was in nav when telling it the path of a location to jump to, in both Emacs 24.1.x and 24.3.x. So the question is why is it that when…
Bleeding Fingers
  • 6,993
  • 7
  • 46
  • 74
1
vote
3 answers

How I yank a function in a java code using vim

Java has curly braces that encapsulate the entire class definition. So when using the parenthsis ({ or }) key in vim, it goes to the end of the class instead of going to the next blank line or the end of the function definition. So how can I yank…
Forethinker
  • 3,548
  • 4
  • 27
  • 48
0
votes
1 answer

Vi how to yank an aren without specifying a buffer and paste

I may want to yank (copy?) by marking from certain point to certain point and paste, but I want to do it without specifying any buffer. As we do in gedit by selecting text and copy-paste.
Junaid
  • 488
  • 1
  • 5
  • 17
0
votes
2 answers

In Vi/Vim, how do I copy a substring inside a line

I have a dictionary in my config file. candidates = {'morpheus':(3,1), 'trinity':(3,1), 'neo':(3,1), 'switch':(3,1)} I can highlight with my mouse one k/v pair (e.g. 'neo':(3,1)) to copy and paste if I needed add more k/v pairs to the dictionary…
Classified
  • 5,759
  • 18
  • 68
  • 99
0
votes
2 answers

How to yank between vi editors, without quitting one?

I have opened two vi editors: vi file1 file2. Now file1 opens first, and i want to yank some lines from file1 and put it to file 2 without quitting file1, because more lines can be yanked, so it is just switching between vi's and yanking. How to…
RajSanpui
  • 11,556
  • 32
  • 79
  • 146
0
votes
1 answer

Vim problem: Yanking/Displaying/Highlighting lines in file that are bound by lines containing certain pattern

I have a file that looks a bit like this foo ! START bar1 ! END foo ! START bar2 ! END foo Is there a way of yanking text that lives between the lines containing START and END patterns? I.e. to get bar1 bar2 I know that doing g/START/+1y would…
0
votes
1 answer

gem yank (<3.1.0) returns "You have enabled multifactor authentication but no OTP code provided" but you can't provide one on the command line

error: You have enabled multifactor authentication but no OTP code provided. Please fill in an retry. this happens if your Gem is < 3.9.0 and you try to yank As you can see, if you provide the option --opt, it still doesn't work, because it tells…
Jason FB
  • 4,752
  • 3
  • 38
  • 69
0
votes
1 answer

copy to clipboard with vim running in windows 10 cmd line window

I have a windows 10 PC. The VIM session is run from a command prompt window. Normally when I copy and paste, I do the following steps: 1. go into edit mode by typing ":" 2. select the text with mouse drag 3. right click on mouse button 4. move…
user97662
  • 942
  • 1
  • 10
  • 29
0
votes
1 answer

Emacs 24.5 , CUA mode. Not paste text in the minibuffer

In Windows 7 / Emacs 24.5 Copy text e.g. "example" in the kill-ring M-x C-y (yank) Success show text "example" in the minibuffer But if turn on CUA-mode, the text "example" not yank (paste) by 'C-v' in the minibuffer.
Alexei
  • 14,350
  • 37
  • 121
  • 240
0
votes
2 answers

vim : Yanking doesn't work between file

I'm stuck up with a weird problem. I am trying to copy(yy) and paste(p) a line from one file to another (in split screen). It doesn't look it its working. However, yy, p works in the same file and with another file opened in another "tab". Would be…
0
votes
2 answers

vim: copy into system clipboard not working

In my .vimrc I have those two lines for copy and paste into the system clipboard: nnoremap p "+p nnoremap y "+y Weirdly the remapping of pasting works fine, but I can't copy any lines. If I press the buttons "+y it works and the…
Natjo
  • 2,005
  • 29
  • 75
0
votes
1 answer

How to kill line in Terminal and yank it into Emacs buffer?

I know I can kill current line text by using Ctrl+k in Terminal(Terminal.app). I want to know how to yank it to Emacs. For example: |------+-----------------+--------------| | step | action | where …
Kei Minagawa
  • 4,395
  • 3
  • 25
  • 43
0
votes
3 answers

yanking lines from one terminal to another

I have two Terminals with vim open, side by side. Each Terminal has a different file. I can yank and paste lines within one of these Terminals/files, but how do I paste the yanked lines from one Terminal/file into the other open Terminal/file?
Justin
  • 164
  • 7