I'm trying to find the right ex command to overwrite the current vim buffer with the system clipboard.
The relevant system clipboard register is "+ in this case.
My first guess was to use :%+p; i.e. select the whole buffer % and then paste p the "+ register to the current buffer. But this doesn't work.
The other way around, yanking the current buffer into the system clipboard is accomplished by :%y+; % select the whole buffer; y copy; + to the system clipboard register.
:%p+, by the registers come after; it results in an error:E488: Trailing characters. – Mussé Redi Jun 18 '18 at 13:23:%d | put +doesn't work either, obviously since it's the same command. But, I'll be digging into this too; two commands seem like the right amount. :) – Mussé Redi Jun 18 '18 at 13:26p+doesn't work becausepis the print command,:puis the shortest form of put (:%pu+is valid but doesn't quite do what you want). – Mass Jun 18 '18 at 23:28