Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

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

share|improve this answer
add comment

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
share|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.) –  Lauri Ranta Dec 6 '11 at 10:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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