How did the word yank come to mean copying a text in vi and Emacs?

  • Do you know what yank itself means?
    – simchona
    Sep 5 '11 at 1:51
  • 1
    @simchona: none that seems to imply copying.
    – Lie Ryan
    Sep 5 '11 at 2:09
  • 1
    That's because yanking isn't copying - it's pasting. In emacs you yank from killed and copied text. Sep 5 '11 at 12:11
  • 1
    @Matt - In emacs you yank text from the kill ring and insert it into the document (a paste operation) whereas in vi you yank from the document into the paste buffer non destructively (a copy operation).
    – Mark Booth
    Sep 5 '11 at 13:25
  • 2
    @ChaosGamer: feel free to disagree, but looking at the related questions on the side bar, I wouldn't think so. There are quite a lot of previous questions about word origins and how they come into usage, and this question is of no difference (although some of the comments do wander off into other tangential issues).
    – Lie Ryan
    Sep 6 '11 at 3:08

The letter c was already taken for change so they couldn't use "copy". They needed another word. They couldn't use w for write, because it already means word. They couldn't use p for put, because it was already used for paste. And so on. (http://www.gammon.com.au/smaug/vi.htm has a list of vi commands.) Eventually someone came up with a word, yank, that didn't start with a letter that was already being used, and that at least vaguely carried the right meaning. Plus for some people, they remember it as the last letter of copy. The fact that you can think of words that better mean "copylike behaviour" isn't really the point.

  • 3
    And don't forget the potential humor value. Computer terms from the old days before over-commercialization almost always have some humorous purpose. As an aside, I like to explain that the ctrl-x;c;v stand for 'cut, copy, velcro"
    – horatio
    Sep 6 '11 at 16:28
  • 1
    Shouldn't the ctrl-x be eXcise instead of cut? I do like your ctrl-v = Velcro, though. Jan 26 '16 at 18:29

Yank in the sense of pull is a BE term from early least 1800s - which makes sense in terms of "grab a copy of". It's still a common term for pull sharply.

So if not older than yank (as a term for American) it is older than emacs (or even vi)

  • From Oxford Dictionaries Online, origin is noted as late 18th century (as a Scots word in the sense ‘sudden sharp blow’): of unknown origin
    – Mark Booth
    Sep 5 '11 at 10:18
  • That much, I know, the question is why is yank associated with copy-pasteing, when its original meaning does not seem to have anything to do with copying or pasting.
    – Lie Ryan
    Sep 6 '11 at 0:31
  • 1
    Another early meaning is to pull. Which makes sense as in grab a copy of
    – mgb
    Sep 6 '11 at 6:02

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