Textualize/trogon

Vim keybindings

fresh2dev opened this issue · 4 comments

It would be nice to use ctrl+h/j/k/l to navigate the form, or at least the command-tree.

It's difficult for this to work in the form because ctrl+k for example deletes the text between the cursor and the end of the line. It could work for the command tree through.

That's an easter egg I was not aware of. Implementing this specific to the command-tree would be great, since that's the most applicable use-case anyway. I can happily tab/shift+tab my way through the form.

davep commented

Just for clarity: it's not an easter egg, it's one of the documented bindings for the Textual Input widget (being well known to macOS users, amongst others).

To have Vim-style key bindings, I think you need to make the entire UI modal, which requires Textual to have the ability to enable/disable key bindings dynamically, which can further be useful in many other scenarios, e.g., enabling/disabling tab-specific hotkeys when switching tabs.