Skip to content

Add vim motions to the results view#181

Merged
Maxteabag merged 2 commits intomainfrom
worktree-vim-result-view
Apr 18, 2026
Merged

Add vim motions to the results view#181
Maxteabag merged 2 commits intomainfrom
worktree-vim-result-view

Conversation

@Maxteabag
Copy link
Copy Markdown
Owner

Closes #170.

Adds vim-style navigation to the results table:

  • gg / G — first / last row
  • Ctrl+U / Ctrl+D — page up / down
  • 0 / $ — first / last column of the current row
  • f / F — filterable column picker; typing narrows the list, Enter jumps the cursor to that column, Esc cancels

gg reuses the existing leader-menu pattern (new rg menu, mirroring how g works in the query editor). The other motions delegate to FastDataTable's own action_cursor_* / action_page_* methods, so scroll-follow, wrapping, and empty-table behavior come for free.

Tests in tests/ui/keybindings/test_results_vim_motions.py drive the app with Textual's pilot, populate results via _display_query_results, and assert cursor_coordinate after each key press.

Binds vim-style navigation in the results table:

  gg / G      go to first/last row
  Ctrl+U / D  page up/down
  0 / $       first/last column of current row
  f / F       filterable column picker (Enter to jump, Esc to cancel)

Closes #170
gg/G and Ctrl+U/Ctrl+D now keep the current column instead of resetting
to column 0 (gg) or the last column (G). FastDataTable's built-in
action_cursor_table_start/end clobber the column, so dispatch through a
helper that sets cursor_coordinate with the original column preserved.
@Maxteabag Maxteabag merged commit ea132d9 into main Apr 18, 2026
21 checks passed
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.

FeatureRequest: VimMotions in result

1 participant