about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2022-02-14T20·19-0800
committerclbot <clbot@tvl.fyi>2022-02-14T21·57+0000
commit3506cd712c42935a1148c7be7ec2427419f4c2c5 (patch)
tree271373eca8ae7de18c5ed00d94014550b532f554
parentd052ab21fdceffd6829af3bc5ef7ad08a678ae58 (diff)
feat(wpcarro/emacs): Support C-v style pasting in ivy minibuffer r/3829
This is handy for pasting a git commit SHA in magit's checkout minibuffer.

I also removed the dependency on clipboard.el because clipboard-yank is defined
elsewhere.

Change-Id: I6872bf63e4ba9c2b186466d083e6798123d417cc
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5286
Tested-by: BuildkiteCI
Reviewed-by: wpcarro <wpcarro@gmail.com>
Autosubmit: wpcarro <wpcarro@gmail.com>
-rw-r--r--users/wpcarro/emacs/.emacs.d/wpc/keybindings.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/users/wpcarro/emacs/.emacs.d/wpc/keybindings.el b/users/wpcarro/emacs/.emacs.d/wpc/keybindings.el
index da81808837a5..ca9ba16271b8 100644
--- a/users/wpcarro/emacs/.emacs.d/wpc/keybindings.el
+++ b/users/wpcarro/emacs/.emacs.d/wpc/keybindings.el
@@ -22,10 +22,10 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (require 'functions)
-(require 'clipboard)
 (require 'screen-brightness)
 (require 'pulse-audio)
 (require 'scrot)
+(require 'ivy)
 (require 'ivy-clipmenu)
 (require 'ivy-helpers)
 (require 'general)
@@ -423,5 +423,15 @@
 
 (global-set-key (kbd "C-;") #'avy-goto-char)
 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; ivy
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; restore the ability to paste in ivy
+(general-define-key
+ :keymaps '(ivy-minibuffer-map)
+ "C-v" #'clipboard-yank
+ "C-S-v" #'clipboard-yank)
+
 (provide 'keybindings)
 ;;; keybindings.el ends here