Created
May 17, 2019 14:56
-
-
Save retrography/ec73c8aeb36e4f2fdbb449f1de1e2ce8 to your computer and use it in GitHub Desktop.
OH-MY-ZSH Custom Plugin -- Redefines the most used kill ring bindings to sync with the system clipboard (requires clipcopy plugin)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kill-line() { zle .kill-line ; echo -n $CUTBUFFER | clipcopy } | |
zle -N kill-line | |
bindkey "^K" kill-line | |
kill-whole-line() { zle .kill-whole-line ; echo -n $CUTBUFFER | clipcopy } | |
zle -N kill-whole-line | |
bindkey "^U" kill-whole-line | |
yank() { LBUFFER=$LBUFFER$(clippaste) } | |
zle -N yank | |
bindkey "^Y" yank |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment