Terminal Vim opens files in REPLACE mode by default #10609

Closed
opened 2026-01-31 02:25:39 +00:00 by claunia · 4 comments
Owner

Originally created by @nickjj on GitHub (Sep 12, 2020).

Environment

Windows build number: Microsoft Windows [Version 10.0.19041.508]
Windows Terminal version (if applicable): Windows Terminal Preview / Version: 1.3.2382.0

It's also worth pointing out the problem exists with the regular stable release of Windows Terminal too.

Steps to reproduce

  1. Within Ubuntu 20.04 LTS WSL 2 install Vim with sudo apt-get update && sudo apt-get install vim-gtk
  2. touch test.txt
  3. vim test.txt
  4. Notice that you're in REPLACE mode instead of NORMAL mode

Expected behavior

When opening a file you should be in NORMAL mode by default.

Actual behavior

You're in REPLACE mode by default instead of NORMAL mode.


I believe this is specific to MS terminal because this problem doesn't happen with wsltty (another Windows terminal). I've also never seen this problem happen in native Linux on any terminal with the same vimrc file that I use.

The workaround for now is to set set t_u7= in your vimrc, but this conflicts with other terminals so it's not a bullet proof solution.

The interesting thing is the issue doesn't happen if you run vim -u NONE which disables user specific configuration, but this thread on StackOverflow makes it seem like it definitely is something stemming from the Windows terminal in the end https://superuser.com/a/1525060.

Originally created by @nickjj on GitHub (Sep 12, 2020). # Environment ```none Windows build number: Microsoft Windows [Version 10.0.19041.508] Windows Terminal version (if applicable): Windows Terminal Preview / Version: 1.3.2382.0 ``` It's also worth pointing out the problem exists with the regular stable release of Windows Terminal too. # Steps to reproduce 1. Within Ubuntu 20.04 LTS WSL 2 install Vim with `sudo apt-get update && sudo apt-get install vim-gtk` 2. `touch test.txt` 3. `vim test.txt` 4. Notice that you're in REPLACE mode instead of NORMAL mode # Expected behavior When opening a file you should be in NORMAL mode by default. # Actual behavior You're in REPLACE mode by default instead of NORMAL mode. --- I believe this is specific to MS terminal because this problem doesn't happen with wsltty (another Windows terminal). I've also never seen this problem happen in native Linux on any terminal with the same vimrc file that I use. The workaround for now is to set `set t_u7=` in your vimrc, but this conflicts with other terminals so it's not a bullet proof solution. The interesting thing is the issue doesn't happen if you run `vim -u NONE` which disables user specific configuration, but this thread on StackOverflow makes it seem like it definitely is something stemming from the Windows terminal in the end https://superuser.com/a/1525060.
claunia added the Resolution-Duplicate label 2026-01-31 02:25:39 +00:00
Author
Owner

@j4james commented on GitHub (Sep 12, 2020):

I'm guessing this is the same problem as issue #1637, which was recently fixed in PR #7583. The fix should be available in the next preview release.

@j4james commented on GitHub (Sep 12, 2020): I'm guessing this is the same problem as issue #1637, which was recently fixed in PR #7583. The fix should be available in the next preview release.
Author
Owner

@nickjj commented on GitHub (Sep 12, 2020):

Indeed, thanks. There's also more discussion from the Vim side at https://github.com/vim/vim/issues/6365#issuecomment-652353135.

@nickjj commented on GitHub (Sep 12, 2020): Indeed, thanks. There's also more discussion from the Vim side at https://github.com/vim/vim/issues/6365#issuecomment-652353135.
Author
Owner

@DHowett commented on GitHub (Sep 12, 2020):

/dup #1637 thanks all!

@DHowett commented on GitHub (Sep 12, 2020): /dup #1637 thanks all!
Author
Owner

@ghost commented on GitHub (Sep 12, 2020):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Sep 12, 2020): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10609