up vote 2 down vote favorite
share [g+] share [fb]

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?

link|improve this question

63% accept rate
feedback

2 Answers

up vote 3 down vote accepted

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%5F13.html#SEC59

link|improve this answer
feedback

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
link|improve this answer
Does Xcode use a kill ring instead of the clipboard when using Yank in Xcode? Are they integrated or independent? – Daniel Beck Dec 6 '11 at 8: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 6 '11 at 10:06
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.