From 00859dd216b3c78c92d40dfca4725adc047662f4 Mon Sep 17 00:00:00 2001 From: Yuan Chiu Date: Mon, 5 May 2025 12:23:46 +0800 Subject: [PATCH] =?UTF-8?q?feat=20zsh:=20shift=E9=81=B8=E5=8F=96=20?= =?UTF-8?q?=E8=88=87C-y,=20C-p=20=E8=A4=87=E8=A3=BD=E8=B2=BC=E4=B8=8A?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dot_zshrc.tmpl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dot_zshrc.tmpl b/dot_zshrc.tmpl index 4c7a87e..283de50 100644 --- a/dot_zshrc.tmpl +++ b/dot_zshrc.tmpl @@ -128,6 +128,21 @@ alias cp="cp -i" # Confirm before overwriting something alias df='df -h' # Human-readable sizes alias free='free -m' # Show sizes in MB +# Zsh Shift Select Mode +zinit light jirutka/zsh-shift-select +# 定義 Ctrl+Y:複製選取的區塊 +function my_copy_region() { + zle copy-region-as-kill +} +zle -N my_copy_region +bindkey '^Y' my_copy_region +# 定義 Ctrl+P:貼上(yank) +function my_paste() { + zle yank +} +zle -N my_paste +bindkey '^P' my_paste + # overwrite ls if command -v colorls &> /dev/null; then alias ls='colorls'