vim copy command to clipboard / buffer

Viewed 13784

How to copy the ex command to the clipboard or paste it to the buffer?

Using gvim on Windows.

6 Answers

To copy the last executed command to your clipboard:

:let @+=@:

Essentially assign the command (:) register to the system clipboard (+) register.

Related