Assuming the current buffer is a file open for edit, so :e
does not display E32: No file name
.
I would like to yank one or all of:
Answer tested on Neovim/Ubunutu.
From what I can tell, the %
register already contains the relative filepath, so it's as simple as moving the contents of the %
register to whatever register represents your favourite clipboard.
This SO answer deals with copying from one register to another
:let @+=@%
Seems pretty straightforward to me. No need for any hard-to-remember expand()
stuff.