Textualize / trogon

Easily turn your Click CLI into a powerful terminal application
MIT License
2.5k stars 54 forks source link

Vim keybindings #47

Open fresh2dev opened 1 year ago

fresh2dev commented 1 year ago

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

darrenburns commented 1 year ago

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.

fresh2dev commented 1 year ago

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 happilytab/shift+tab my way through the form.

davep commented 1 year ago

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).

liancheng commented 1 year ago

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.