0
我要綁定在zsh中的vicmd成類似 'DDI' 'DD',如果我使用:的zsh-綁定:在vi模式noremap
bindkey -M vicmd -s dd 'ddi'
它會給我這樣的輸出:
zsh: string inserting another one too many times
我要綁定在zsh中的vicmd成類似 'DDI' 'DD',如果我使用:的zsh-綁定:在vi模式noremap
bindkey -M vicmd -s dd 'ddi'
它會給我這樣的輸出:
zsh: string inserting another one too many times
我已經找到了答案
function delete_then_insert(){
zle kill-whole-line
zle vi-insert
}
zle -N delete_then_insert
bindkey -M vicmd dd delete_then_insert