Skip to content

feat(cli): add vim mode cursor shape setting#25347

Closed
chrisjcthomas wants to merge 3 commits intogoogle-gemini:mainfrom
chrisjcthomas:vim-cursor-shape-indicator
Closed

feat(cli): add vim mode cursor shape setting#25347
chrisjcthomas wants to merge 3 commits intogoogle-gemini:mainfrom
chrisjcthomas:vim-cursor-shape-indicator

Conversation

@chrisjcthomas
Copy link
Copy Markdown
Contributor

Summary

Adds an opt-in general.vimModeCursorShape setting that updates the terminal cursor shape to reflect Vim INSERT vs NORMAL mode.

Details

  • adds a useVimCursorShape hook that emits DECSCUSR cursor-shape sequences for INSERT and NORMAL mode
  • wires the hook into VimModeProvider so it reacts to both mode transitions and live settings changes
  • restores the default cursor shape when the feature is disabled and during terminal cleanup on exit
  • regenerates the settings docs and JSON schema for the new setting
  • CC @cocosheng-g

Related Issues

Fixes #18390

How to Validate

  • Run npx vitest run packages/cli/src/ui/hooks/useVimCursorShape.test.ts packages/cli/src/config/settings-validation.test.ts packages/cli/src/config/settingsSchema.test.ts
  • Run npm run docs:settings
  • Run npm run schema:settings
  • In a DECSCUSR-compatible terminal, enable general.vimMode and general.vimModeCursorShape, then verify INSERT mode shows a bar cursor and NORMAL mode shows a block cursor.

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • MacOS
      • npm run
      • npx
      • Docker
      • Podman
      • Seatbelt
    • Windows
      • npm run
      • npx
      • Docker
    • Linux
      • npm run
      • npx
      • Docker

Your Name and others added 2 commits February 17, 2026 01:42
- Document vi mode keyboard shortcuts in keyboard-shortcuts.md
  including navigation, editing, and mode switching commands
- Add note that custom sandbox Dockerfile builds are only supported
  when running from source code (not via npm install)

Closes google-gemini#17381, google-gemini#15141
@google-cla
Copy link
Copy Markdown

google-cla Bot commented Apr 14, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@chrisjcthomas
Copy link
Copy Markdown
Contributor Author

The CLA check appears to be mismatched rather than unsigned.

Evidence:

  • My Google Individual CLA is already signed under cobekgn@gmail.com as of March 9, 2026.
  • My earlier PR docs: add vi shortcuts and clarify MCP sandbox setup #21679 passed cla/google on April 9, 2026.
  • This PR is authored from the same GitHub account (@chrisjcthomas) and commit email (cobekgn@gmail.com).
  • I pushed a no-op commit to retrigger the check, and cla/google still failed on the updated head.

If a maintainer can rerun or refresh the CLA association for this PR, I’d appreciate it.

@chrisjcthomas chrisjcthomas deleted the vim-cursor-shape-indicator branch April 14, 2026 01:31
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.

Add vim mode cursor shape indicator and setting

1 participant