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:
parent
ec2062f517
commit
7ca50e0ce8
2 changed files with 7 additions and 0 deletions
|
@ -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."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue