mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
config/default: add & bind +evil/paste-preserve-register (gp)
This commit is contained in:
@ -326,6 +326,7 @@
|
|||||||
:m "gd" #'+lookup/definition
|
:m "gd" #'+lookup/definition
|
||||||
:m "gD" #'+lookup/references
|
:m "gD" #'+lookup/references
|
||||||
:n "gp" #'+evil/reselect-paste
|
:n "gp" #'+evil/reselect-paste
|
||||||
|
:v "gp" #'+evil/paste-preserve-register
|
||||||
:n "gr" #'+eval:region
|
:n "gr" #'+eval:region
|
||||||
:n "gR" #'+eval/buffer
|
:n "gR" #'+eval/buffer
|
||||||
:v "gR" #'+eval:replace-region
|
:v "gR" #'+eval:replace-region
|
||||||
|
@ -27,6 +27,14 @@
|
|||||||
(save-excursion (goto-char beg) (point-marker))
|
(save-excursion (goto-char beg) (point-marker))
|
||||||
end)))
|
end)))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun +evil/paste-preserve-register ()
|
||||||
|
"Call `evil-paste-after' without overwriting the clipboard (by writing to the
|
||||||
|
0 register instead). This allows you to paste the same text again afterwards."
|
||||||
|
(interactive)
|
||||||
|
(let ((evil-this-register ?0))
|
||||||
|
(call-interactively #'evil-paste-after)))
|
||||||
|
|
||||||
(defun +evil--window-swap (direction)
|
(defun +evil--window-swap (direction)
|
||||||
"Move current window to the next window in DIRECTION. If there are no windows
|
"Move current window to the next window in DIRECTION. If there are no windows
|
||||||
there and there is only one window, split in that direction and place this
|
there and there is only one window, split in that direction and place this
|
||||||
|
Reference in New Issue
Block a user