Word base keymap
Closed this issue · 1 comments
Hi, I wander if we could support for word base keymap, or could I do this by mapping some keymap?
For example(emacs style):
C-w -> delete a word
M-f -> move forward a word
M-b -> move backward a word
Thanks for the suggestion, we could certainly add support for configuring keymaps to make those changes in the prompt. The prompt keymaps are handled via a Vim popup-filter function, see PromptFilter() in popup.vim.
It would need newly defined keys in the keymaps dict, e.g. delete_word, possibly with no pre-defined mapped keys (requiring a user to enable these keymaps via g:fuzzyy_keymaps), and a few lines of code to handle each one in PromptFilter() (modify the content of the prompt, move the cursor position).
I'll have a look at it when I get a chance, feel free to open PR with proposed changes if you want to take a look yourself :-)