Skip to content

Add vim scroll motions to the explorer tree#275

Open
devHaitham481 wants to merge 1 commit into
Maxteabag:mainfrom
devHaitham481:feat/explorer-vim-scroll-motions
Open

Add vim scroll motions to the explorer tree#275
devHaitham481 wants to merge 1 commit into
Maxteabag:mainfrom
devHaitham481:feat/explorer-vim-scroll-motions

Conversation

@devHaitham481

Copy link
Copy Markdown

The explorer only had j/k for single-step cursor movement, so getting
around a large schema tree meant holding a key. This brings it in line
with the results pane:

  • Ctrl+D / Ctrl+U page down/up (full visible page, matching results)
  • gg jumps to the first node, G jumps to the last node

Details:

  • keymap: bind ctrl+d/ctrl+u/g/G in the tree context and add a "tg"
    leader menu for gg, mirroring the results "rg" menu
  • tree mixin: build on Textual Tree's page/cursor API and reuse a shared
    helper for the visual-mode selection refresh
  • tree_focused state: allow the new actions
  • help: document the motions in the EXPLORER section of the ? screen
  • tests: cover gg, G, Ctrl+D/Ctrl+U, and the help entries

The explorer only had j/k for single-step cursor movement, so getting
around a large schema tree meant holding a key. This brings it in line
with the results pane:

- Ctrl+D / Ctrl+U page down/up (full visible page, matching results)
- gg jumps to the first node, G jumps to the last node

Details:
- keymap: bind ctrl+d/ctrl+u/g/G in the tree context and add a "tg"
  leader menu for gg, mirroring the results "rg" menu
- tree mixin: build on Textual Tree's page/cursor API and reuse a shared
  helper for the visual-mode selection refresh
- tree_focused state: allow the new actions
- help: document the motions in the EXPLORER section of the ? screen
- tests: cover gg, G, Ctrl+D/Ctrl+U, and the help entries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant