Skip to content
New issue

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

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

Already on GitHub? # to your account

Navigating tasks with vim keys #531

Open
IgnacioJPickering opened this issue May 19, 2023 · 6 comments
Open

Navigating tasks with vim keys #531

IgnacioJPickering opened this issue May 19, 2023 · 6 comments

Comments

@IgnacioJPickering
Copy link

I would like to navigate the TUI using vim-style keybindings (hjkl, triggered by the "escape" key). Is this a possibility?

@WhyNotHugo
Copy link
Member

It might be simpler to configure ctrl+j, ctrl-k, etc (kinda like what fzf does). Modal editing might require more complicated changes (but should still be doable).

@balejk
Copy link
Contributor

balejk commented Oct 13, 2023

I have not spent any time trying to find out who is "guilty" for this (my terminal emulator/todoman/framework that todoman uses for interactive mode if any), but I accidentally discovered that Ctrl+o opens the currently focused field in external editor (vim in my case). I'm pretty sure that it is not a feature of my terminal emulator, which means it could work for you too. It will not help you with switching fields but it should if you are looking for a way to edit the individual fields in vim-like way.

Regarding switching fields: Ctrl+j/k would indeed be one natural possibility, another one would be (Shift+)Tab since Tab does not seem to currently insert an actual tab or do anything else. khal implements the latter.

Edit: it seems that the field jumping using tab is already being discussed in #204. Also my guess is that urwid is the one responsible for the open-in-editor feature.

@WhyNotHugo
Copy link
Member

The Ctrl+o thing is a todoman feature:

elif key == "ctrl o":
# Allow editing in $EDITOR
self._editor()

@WhyNotHugo
Copy link
Member

WhyNotHugo commented Oct 13, 2023

ctrl+k is mapped to "delete till end of line". I'm not sure why this is. Maybe readline compat?

@WhyNotHugo WhyNotHugo added enhancement contributions welcome Further design discussions and PRs are welcome. discussion and removed contributions welcome Further design discussions and PRs are welcome. labels Oct 13, 2023
@balejk
Copy link
Contributor

balejk commented Oct 13, 2023 via email

@WhyNotHugo
Copy link
Member

The function that I linked above delegates any "unknown" key mappings to urwid. Arrow keys must be implemented by them.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants