0

I want to bind 'dd' in the zsh's vicmd into something like 'ddi', If i use:

bindkey -M vicmd -s dd 'ddi'

It will give me this output:

zsh: string inserting another one too many times
paulmelnikow
  • 16,895
  • 8
  • 63
  • 114
Ary Purnomoz
  • 131
  • 2
  • 9

1 Answers1

0

I found the answer already

function delete_then_insert(){
  zle kill-whole-line
  zle vi-insert
}

zle -N  delete_then_insert
bindkey -M vicmd dd delete_then_insert
Ary Purnomoz
  • 131
  • 2
  • 9