Open
Conversation
Implements an optional Vim-style editing mode toggled with Ctrl+Shift+V. Supports Normal mode (h/j/k/l motions, w/b/e word motions, 0/$/^/G/gg jumps, d/y/c operators with motions, x delete, p/P paste, i/a/I/A/o/O insert transitions), Insert mode (standard editing with Esc to return), and Visual/Visual-Line mode (extend selection with motions, d/y/c to act). Shows mode indicator in status bar. Preference persisted to config file. Closes #17 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Ctrl+Shift+V was intercepted by most terminals as paste before crossterm could see it. Fix the toggle to support three methods: - Ctrl+Shift+V: now matches uppercase 'V' with CONTROL only (shift is implicit in the uppercase letter), works in terminals that don't intercept this combo - Alt+V: universal alternative that works on all terminals - F2: function key fallback, never intercepted by terminals Update help overlay and add vim mode documentation to README. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements Issue #17 — an optional Vim-style editing mode for the SQL editor.
~/.config/pgrsql/vim_modeNormal Mode
h/j/k/lw/b/e0/$/^gg/Gi/a/I/Ao/Ov/Vxdd/dw/d$/d0yy/yw/y$cc/cw/c$p/P3j)Insert Mode
Escreturns to Normal modeVisual/V-Line Mode
d/y/coperate on selectionChanges
src/ui/app.rsVimModeenum, vim state fields,handle_vim_normal_input(),handle_vim_insert_input(),handle_vim_visual_input(), vim helpers, toggle keybinding, preference persistencesrc/ui/components.rsTest plan
cargo clippycleancargo fmtcleanienters insert mode,Escreturns to normalh/j/k/lnavigate,w/bword motions workdddeletes line,yyyanks,ppastesventers visual mode,ddeletes selection🤖 Generated with Claude Code