aboutsummaryrefslogtreecommitdiffstats
path: root/zsh/zshrc.org
diff options
context:
space:
mode:
authorGravatar Tom Willemse2016-10-21 14:51:21 +0200
committerGravatar Tom Willemse2016-10-21 14:51:21 +0200
commit5d5a506f35417c8c71900003c1d7400af5099b9b (patch)
tree3a05fd9372df2f9f35b3a0aa4f3c368f22f81c5a /zsh/zshrc.org
parent20ce605e175eea156162f8ef8e0a32f5a1dbbb3b (diff)
downloadnew-dotfiles-5d5a506f35417c8c71900003c1d7400af5099b9b.tar.gz
new-dotfiles-5d5a506f35417c8c71900003c1d7400af5099b9b.zip
Allow zsh to copy/paste to clipboard
Diffstat (limited to 'zsh/zshrc.org')
-rw-r--r--zsh/zshrc.org16
1 files changed, 16 insertions, 0 deletions
diff --git a/zsh/zshrc.org b/zsh/zshrc.org
index 66550ee..2207ead 100644
--- a/zsh/zshrc.org
+++ b/zsh/zshrc.org
@@ -56,6 +56,22 @@ Load all plugins.
zplug load --verbose
#+END_SRC
+Make some widgets for interacting with the clipboard.
+
+#+BEGIN_SRC sh
+ zle -N x-copy-region-as-kill
+ zle -N x-kill-region
+ zle -N x-yank
+#+END_SRC
+
+Bind them to keyboard shortcuts.
+
+#+BEGIN_SRC sh
+ bindkey -e '^[w' x-copy-region-as-kill
+ bindkey -e '^W' x-kill-region
+ bindkey -e '^Y' x-yank
+#+END_SRC
+
Initialize completion. This triggers loading of
zsh-syntax-highlighting as well.