Hacker News new | ask | show | jobs
by _zywo 1517 days ago
> xp

I always thought the fact that Vim had automatic buffer copying and forced me to use "0p instead of p was really annoying. Looks like there is an actual reason for it after all :)

1 comments

(Apologies if I’m misunderstanding and you already know this.)

Not specifying a register (e.g. "0) just means the commands, including x and p, will use the " register, aka the unnamed register. By itself, p is equivalent to ""p.

:reg shows you all the registers and their current contents.

This seems like a good description: https://www.brianstorti.com/vim-registers/

Edit: Oh I guess you are saying it was unexpected that delete or change commands clobber yanked contents of the unnamed register.