4

In XCode there's a text key binding ^Y to the "yank" command.

What does "yank" mean? I thought it was to "yank back deleted text" but so far it only "yanks back" text I cut, which means its synonymous with "paste" on windows?

Tamara Wijsman
  • 57,083
  • 27
  • 185
  • 256
bobobobo
  • 5,302
  • 8
  • 46
  • 61

2 Answers2

4

Yes, yanking and pasting are different terms for the same thing. I first learned about it through pico, and it seems that emacs uses the term as well:

http://www.slac.stanford.edu/comp/unix/gnu-info/emacs_13.html#SEC59

Pops
  • 8,393
  • 29
  • 76
  • 95
3

Yank inserts the most recent block of text from the kill buffer, which is the CLI equivalent of a clipboard.

Some ways the kill ring is different from the clipboard on OS X:

  • For example ⌃K, ⌘⌫ and add the deleted text to the kill ring
  • Copied text is not added to the kill ring
  • It can only contain plain text
    • Yank acts like paste and match style in rich text views
  • Pressing ⌃K multiple times in a row appends all deleted ranges into a single block
Lri
  • 40,894
  • 7
  • 119
  • 157
  • Does Xcode use a kill ring instead of the clipboard when using Yank in Xcode? Are they integrated or independent? – Daniel Beck Dec 06 '11 at 08:15
  • Text fields in Xcode behave like standard text views in most cases, so the kill ring is independent from the clipboard. (Even though ⌘X adds the deleted text to both.) – Lri Dec 06 '11 at 10:06