[vim/vim] How to fix `vim` sometimes starting in `REPLACE` mode? (Discussion #18608)

4 views
Skip to first unread message

Björn Kautler

unread,
Oct 20, 2025, 9:42:31 AM (22 hours ago) Oct 20
to vim/vim, Subscribed

On this box I'm using Git Bash in Windows Terminal.
I have fzf around.
Together with its bash-integration.
And additionally fzf-git.sh.
The Bash integration for both is enabled by having

eval "$(fzf --bash)"
source $(dirname "$BASH_SOURCE")/fzf-git.sh

in ~/bash_completion.d/fzf.bash.

When I start vim normally, all is fine.
But if I use Ctrl+G Ctrl+F inside a Git worktree to start the file mode of fzf-git.sh,
and there use Alt+E to start the editor on a file with EDITOR set to vim,
vim starts in REPLACE mode.

Having skimmed through #6365,
I tried to set export EDITOR="vim --cmd \"call ch_logfile('logfile', 'w')\"" to get the according logging and tried with the working and broken invocations.

The logfile from the working invocation has raw key input: "�[2;2R�[3;1R"
while the broken invocation has raw key input: "[2;2R�[3;1R".
So in the broken case there is a missing escape character which then causes the first R to be interpreted as starting REPLACE mode.

But I'm unsure how to progress from here.
How can I find out why this is happening / how to fix it / where to report an actionable bug report.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/repo-discussions/18608@github.com>

Reply all
Reply to author
Forward
0 new messages