Skip to content

feat: Vim mode (#405)#630

Merged
tomlin7 merged 1 commit into
mainfrom
vim-mode
Jul 18, 2026
Merged

feat: Vim mode (#405)#630
tomlin7 merged 1 commit into
mainfrom
vim-mode

Conversation

@tomlin7

@tomlin7 tomlin7 commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Summary

Implements the basic Vim mode as described in issue #405.

New files

File Purpose
src/biscuit/editor/text/vim/init.py Package export
src/biscuit/editor/text/vim/motion.py Pure cursor-movement helpers (h/j/k/l, w/b/e, 0/$/^, gg/G, word boundaries)
src/biscuit/editor/text/vim/operator.py Delete/yank/change/paste with internal register + system clipboard sync
src/biscuit/editor/text/vim/vim.py Core state machine: NORMAL / INSERT / VISUAL / VISUAL LINE / COMMAND
src/biscuit/common/ui/vimbar.py :\ command-line bar + ephemeral operation messages
src/biscuit/layout/statusbar/keypresslog.py Keypress display widget (streamer mode)

Modified files

  • statusbar.py — color-coded mode indicator (NORMAL/INSERT/VISUAL/COMMAND), keypress display
  • text.py — \enable_vim_mode()\ / \disable_vim_mode(), auto-enable on new editors
  • commands.py — \ oggle_vim_mode, \ oggle_keypress_display\ (appear in command palette)
  • binder.py — \Ctrl+Alt+V\ keybinding
  • config.py / settings/config.py — \�im_mode\ and \keypress_display\ flags
  • layout/root.py — VimBar wired into layout

Features implemented

  • Normal mode: h/j/k/l, w/b/e, 0/$/^, gg/G, dd/yy/p/P, x, dw/diw/cw/ciw, u/Ctrl-R
  • Insert mode: i/I/a/A/o/O, Esc to return
  • Visual mode: v (char-wise), V (line-wise), d/y/c on selection
  • Command mode: :w, :q, :wq, :\ goto-line
  • Mode indicator in status bar (click to toggle)
  • Vim messages: \1 line yanked, \2 lines deleted, etc. shown in VimBar
  • Keypress display: Toggle Keypress Display in command palette (great for streamers)
  • All specific bindings (brackets, BackSpace, Return, Tab) correctly guarded in Normal/Visual mode

Closes #405

@vercel

vercel Bot commented Jul 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
biscuit Ready Ready Preview, Comment Jul 18, 2026 5:53pm

- VimMode state machine (NORMAL / INSERT / VISUAL / VISUAL LINE / COMMAND)
- motion.py: h/j/k/l, w/b/e, 0/$/^, gg/G, word boundaries
- operator.py: dd/yy/p/P, dw/diw/cw/ciw, x, visual delete/yank/change
- VimBar: : command-line input (:w :q :wq :<line>), ephemeral op messages
  (1 line yanked, 2 lines deleted, selection yanked, etc.)
- Status bar mode indicator (color-coded NORMAL/INSERT/VISUAL/COMMAND)
- Keypress display (streamer mode): shows key combos in status bar pill,
  toggled via command palette - Toggle Keypress Display
- All specific bindings (brackets, BackSpace, Return, Tab) guarded so
  Normal/Visual modes block character insertion correctly
- Toggle via Ctrl+Alt+V or command palette - Toggle Vim Mode
- Persistent vim_mode flag in settings.toml
- keypress_display flag in config
@tomlin7
tomlin7 merged commit 5e3735b into main Jul 18, 2026
6 of 9 checks passed
@tomlin7
tomlin7 deleted the vim-mode branch July 18, 2026 17:54
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.

Vim mode

1 participant