When I use standard zsh ctrl+w deletes whole word (i.e. it would remove whole foo-bar). However, when using oh-my-zsh I would delete only last part of the word and leave foo-. I want to be able to use both.
I want to bind ctrl+q to delete whole word. I've tried to define my own function with WORDCHARS overridden but with no luck:
myf () {
local WORDCHARS=''
zle backward-kill-word
}
zle -N myf
bindkey '^Q' myf
There are couple of similar questions but this one is when using zsh with oh-my-zsh.