Skip to main content
edited tags
Link
Kusalananda
  • 355.9k
  • 42
  • 735
  • 1.1k
Source Link
jshji
  • 153
  • 4

YANKING in Vim and Bash - are they opposite?

I have a very short question that I couldn't really find anywhere else upon googling, though to me this feels like a very natural question to ask, so maybe it's just I'm missing out on something.

So the word YANK feels like it means the opposite in Bash and Vim.

  • In Bash, Copy and Paste is Kill and Yank. Hence we use ctrl-y to paste the text stored in the kill-ring (or, yanking text from kill ring, as in pulling.
  • In Vim, Copy and Paste is Yank and Paste. Hence we use simply p to paste. But we use y to copy text to buffer.

Therefore it feels like to me that in Bash Yank is Copy and in Vim Yank is Paste. In English, Yank means "to pull", so I think it makes more sense to take Yank as Pulling data from buffer / kill-ring (so yank = paste).

But since I couldn't really find any discussion about this, I think there must be a very reasonable explanation for the above question. If anyone can help me understand this, it'll be appreciated!

Thank you!