Created
December 12, 2012 06:43
-
-
Save rummelonp/4265562 to your computer and use it in GitHub Desktop.
zsh で C-k(kill-line)と C-y(yank)をクリップボードと共有する
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
function copy-line-as-kill() { | |
zle kill-line | |
print -rn $CUTBUFFER | pbcopy | |
} | |
zle -N copy-line-as-kill | |
bindkey '^k' copy-line-as-kill | |
function paste-as-yank() { | |
pbpaste | |
} | |
zle -N paste-as-yank | |
bindkey "^y" paste-as-yank |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment