GermainZ / weechat-vimode

A WeeChat script that adds vi-like modes, commands and keybindings.
GNU General Public License v3.0
266 stars 28 forks source link

Ctrl-W binding vim-like behavior in Insert mode #72

Open tardypad opened 6 years ago

tardypad commented 6 years ago

Following my PR #71, Ctrl-W behavior in Insert mode is one more thing I was trying to have behaving more vim-like with a respect of the is_keyword configuration notably.

I currently have that Ctrl-W binding bound to /input delete_previous_word and have defined word_chars_input to be similar to my is_keyword value.

But the behavior is still slightly different than from vim:

I didn't see any way in the current plugin to influence bindings in Insert mode. Did I miss something? If not, do you know if that's doable somehow?

GermainZ commented 5 years ago

I didn't see any way in the current plugin to influence bindings in Insert mode. Did I miss something?

Nope, there are no insert mode bindings. vimode.py tries not to do anything in Insert mode, except for Esc (and similar: Ctrl-Space and imap_esc) detection.

If not, do you know if that's doable somehow?

Maybe an :imap feature can be introduced similar to the current :nmap, where it only acts as an override (so that we don't need to redefine all of WeeChat's key bindings).