mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
feat(default): bind 'SPC b y' to yank whole buffer
Evil may not always be available in all buffers, and in line with the filepath yank commands on SPC f y/Y, I thought this command could be useful. However, I omitted a "replace buffer with paste" command because in any editing context, evil should be available, in which case it'd be redundant with `vigp` (or yig for yanking the buffer). Close: #5281 Co-authored-by: Alex Palaistras <deuill@users.noreply.github.com>
This commit is contained in:
@ -32,6 +32,12 @@
|
||||
((fboundp 'helm-show-kill-ring) #'helm-show-kill-ring)
|
||||
((error "No kill-ring search backend available. Enable ivy, helm or vertico!")))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +default/yank-buffer-contents ()
|
||||
"Copy entire buffer into kill ring."
|
||||
(interactive)
|
||||
(clipboard-kill-ring-save (point-min) (point-max)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +default/yank-buffer-path (&optional root)
|
||||
"Copy the current buffer's path to the kill ring."
|
||||
|
Reference in New Issue
Block a user