-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add key bindings to jump to the next item of the same kind #45
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment:
- The scroll keybindings come directly from Vim (sorry, meant to comment that one of your other PRs but didn't have time), so I'd prefer to preserve them for now.
- I'm okay with adding the more sane scrolling keybindings that you specified alongside them.
- If you know any other interesting paradigms for these shortcuts (Emacs, Sublime Text, IntelliJ, VS Code, ...) I'm open to supporting them as well.
For now, I'm okay with changing page-up/-down to match Mercurial, but we may want to do a holistic reworking of all the keybindings at some point in the future.
Thanks for the feedback! Agreed that this should probably be refactored a bit, I just wanted to get something up as a proposal. I'll be afk for the next week but when I get back I'll push a new revision. |
2ade904
to
d452041
Compare
Ok this is ready for another look. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, just one tiny nit, you can merge this when done!
I queued #46 for merge; you might have to rebase/update tests. |
This changes the bindings as follows: For page up: - Before: page-up OR ctrl-b - After: ctrl-page-up OR ctrl-b For page down: - Before: page-down OR ctrl-f - After: ctrl-page-down OR ctrl-f The page-up and page-down keys will be repurposed in a subsequent commit to jump between editable sections.
These new keybindings are added alongside the existing keybindings. For scroll up: - Before: ctrl-y - After: ctrl-y OR ctrl-up For scroll down: - Before: ctrl-e - After: ctrl-e OR ctrl-down
For example, if the currently highlighted row is a section header, the page down key will jump to the next section. If the currently highlighted row is a line change, the page down key will jump to the next selectable line. The new keybindings are page-up and page-down.
d452041
to
96a2db2
Compare
Thanks for reviewing! |
Nit: the corresponding "feature wishlist" item in the readme is still around. Line 46 in 5cdf339
|
This PR does a few things:
This works well, but probably needs a little bit of polish before submission. Hopefully this can unblock #39 which allows the user to collapse sections using the "focus outward" keybindings (i.e. the left arrow key).