It would be great to implement a version of the Magit "yank" functions that can be combined with evil registers. For example, I often want to copy the commit hash from Magit and paste it into a GitHub issue, Slack channel, etc. It would be really awesome to be able to do this with the keys "+ys (yank to system clipboard).
I think this would require wrapping the magit-yank-* in evil-define-command with register support, but I don't know evil's internals well enough to do it myself.
In the meantime, in case it's useful for others, I wrote the following helper function for copying the top of my kill ring to the system clipboard:
(setq select-enable-clipboard t)
(defun ans/kill-ring-to-clipboard ()
"Copy current kill ring to system clipboard"
(interactive)
(gui-select-text (current-kill 0)))
It would be great to implement a version of the Magit "yank" functions that can be combined with evil registers. For example, I often want to copy the commit hash from Magit and paste it into a GitHub issue, Slack channel, etc. It would be really awesome to be able to do this with the keys
"+ys
(yank to system clipboard).I think this would require wrapping the
magit-yank-*
inevil-define-command
with register support, but I don't know evil's internals well enough to do it myself.In the meantime, in case it's useful for others, I wrote the following helper function for copying the top of my kill ring to the system clipboard: