122

I can't seem to find any way to put the cursor into 'overwrite' mode - as in when you press the insert key and newly typed characters overwrite the existing characters inline. I haven't found any reference anywhere online to the omission or inclusion of such a feature in VS Code, but it seems to be a fairly commonly used feature. Does this exist?

2

6 Answers 6

197

I too was missing the overtype mode in Visual Studio Code, so I went ahead and wrote an Overtype extension to add the behavior!

You can install it by opening the command palette and entering:

ext install overtype

Update: As of this writing (August 2022), VS Code still does not have overtype built in, and the original extension seems to be no longer maintained. There is a more up-to-date fork here.

7
  • 25
    the one time I actually need this stupid button and I didn't hit it on accident....
    – Cody
    Commented Oct 18, 2017 at 15:47
  • 1
    another possibility can be to use another editor in the rare occasions overwrite is desired.
    – citykid
    Commented Jun 13, 2020 at 18:21
  • 2
    4 years later it seems that @Adam Maras extension is in the catalog: Name: Overtype Id: adammaras.overtype Description: Provides insert/overtype mode. Version: 0.2.0 Publisher: Adam Maras VS Marketplace Link: marketplace.visualstudio.com/items?itemName=adammaras.overtype
    – zielot
    Commented Feb 4, 2021 at 18:23
  • 3
    The original extension seems to be abandoned. Here is a fork with several updates: marketplace.visualstudio.com/items?itemName=DrMerfy.overtype Commented Jul 1, 2021 at 15:11
  • 1
    Please notice (at least) the updated fork also overwrites the ctrl+shift-I keybinding from 'Format Document' to 'Toggle Insert/Overwrite'
    – nuala
    Commented Jul 12, 2023 at 11:53
15

For me, I think it's because of an extension called Vim (Vim emulation for Visual Studio Code). I was tired of this problem. Just going through all the extensions and settings, Finally I found this solution. By uninstalling this Vim extension I was free of this error.

1

4
  • Vim (Vim emulation for Visual Studio Code) extension name.
    – Syam Kumar
    Commented Aug 21, 2022 at 16:07
  • 8
    I don't have Vim. I have that lack of overwrite.
    – Zbyszek
    Commented Sep 23, 2022 at 4:47
  • I don't have this extension installed and I still have this problem. Commented Jul 24, 2023 at 22:49
  • Thanks buddy. Have been searching it for a very long time. This saved my day. Commented May 16 at 9:43
2

It seems to be working fine for me both ways I can switch it with shift + i on latest VS Code and macOS system.

2
  • 30
    I don't understand, shift+i just types a capital I. How does it change insert/overwrite/overtype mode?
    – wisbucky
    Commented Jul 29, 2022 at 16:02
  • 1
    Is this when using VSCode like Vim or something? I'm confused.
    – Cloud
    Commented Sep 8, 2022 at 1:56
0

The best I can do is highlight the text I want to replace with the mouse and then start typing. It sorta works.

2
0

It's not built in to VS Code at the time of this writing. If you want it to be, you should give a thumbs up to the relevant feature-request: Insert key doesn't switch to overtype/overwrite mode #1012, which will increase its prioritization. You can also subscribe to it to get notified about discussion and progress. Please avoid making noisy comments there like ones that just consist of "+1" / "bump". It's pretty high in the prioritization list (going by thumbs up reactions, at the time of this writing, it's #26, so keep the thumbs-ups coming and wait patiently).

As others have mentioned, you can install an extension which enables such behaviour, such as the adammaras.overtype extension, or its more up-to-date fork, DrMerfy.overtype (I have no affiliation with these extensions). Note that it purportedly has issues with non-ASCII characters (source).

Useless note: There's also an issue ticket for this in the monaco repo: overwrite mode #86671, but it's closed to track the discussion in the corresponding VS Code issue ticket (I told you this note was useless). Somewhat less useless note: If you're building something with monaco, You might want to see this comment there.

-3

You can follow these steps:

  1. Open the Extensions view in Visual Studio Code by clicking on the Extensions icon on the left-hand side of the editor or by pressing ctrl+shift+X (Windows/Linux) or cmd+shift+ (Mac).
  2. Search for "Vim" in the search bar.
  3. Click on the gear icon next to the "Vim" extension and select "Disable" from the dropdown menu.

Not the answer you're looking for? Browse other questions tagged or ask your own question.