Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vim keybindings #47

Open
fresh2dev opened this issue Jun 23, 2023 · 4 comments
Open

Vim keybindings #47

fresh2dev opened this issue Jun 23, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@fresh2dev
Copy link

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

@darrenburns
Copy link
Member

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.

@darrenburns darrenburns added the enhancement New feature or request label Jun 26, 2023
@darrenburns darrenburns changed the title Feature Request: vim-friendly keybindings Vim keybindings Jun 26, 2023
@fresh2dev
Copy link
Author

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
Copy link
Contributor

davep commented Jun 27, 2023

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
Copy link

liancheng commented Sep 7, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants