vim-mode-bindkey:bindkey:42: no such keymap `vline'
Closed this issue · 2 comments
Deleted user commented
Hello!
I'm trying to make a custom function to copy selected text in visual and vline directly to my clipboard.
It works kind of but I'm getting an error whenever I start the terminal:
error:
vim-mode-bindkey:bindkey:42: no such keymap `vline'
terminal: zsh + oh-my-zsh
os: ubuntu 18.10
custom code:
x-yank() {
zle copy-region-as-kill
print -rn -- $CUTBUFFER | xclip -selection clipboard
}
zle -N x-yank
x-cut() {
zle kill-region
print -rn -- $CUTBUFFER | xclip -selection clipboard
}
zle -N x-cut
x-paste() {
PASTE=$(xclip -selection clipboard -o)
LBUFFER="$LBUFFER${RBUFFER:0:1}"
RBUFFER="$PASTE${RBUFFER:1:${#RBUFFER}}"
}
zle -N x-paste
vim-mode-bindkey visual vline -- x-yank '^C'
vim-mode-bindkey visual vline -- x-cut '^X'
vim-mode-bindkey visual vline -- x-paste '^V'
Deleted user commented
I realized that using only visual is sufficient in this case, my apologies.
softmoth commented
Yes, this is a bit confusing, since vline
is a pseudo-keymap that only exists in this module's state machine. Thanks for filing the bug and for your follow-up report.