[BUG] Prompts lost from vim buffer "ctrl+g to edit in Vim"

Resolved 💬 3 comments Opened Feb 17, 2026 by mweitzel Closed Feb 21, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When I use "ctrl+g" to edit in vim, exiting with :wq (write, quit) closes and the captured buffer is placed in the prompt. This is the intended behavior.

However, like many vim users, the muscle memory to :wqa (write, quit all) closes, and the buffer _is not captured_. So a full page of description is completely lost, and non-recoverable.

What Should Happen?

What should have happened is that closing the ctrl+g to edit in vim with :wqa should have resulted in the buffer replacing the prompt. Not being thrown away entirely.

Error Messages/Logs

There is no error, no logs, no messages. Vim exits successfully, but the buffer is returned to the original state.

Steps to Reproduce

  1. press ctrl+g when the editor is set to vim
  2. edit the buffer
  3. close with :wqa (write, quit all)

And your prompt will not be set to the vim buffer. It is just lost.

Claude Model

Not sure / Multiple models

Is this a regression?

No, this never worked

Last Working Version

n/a

Claude Code Version

2.1.44 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

This is pretty basic functionality. It's been a huge time waste every time I hit the bug. Every time I use ctrl+g to edit in vim it is because I need to take more time than the typical prompt to really type out intent. So though this may look like an edge case, it is a pretty main case.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗