Skip to content

VS Code: Overtype Mode

VS Code Overtype Mode

In this article, we’ll explore a new VS Code feature that lets you overwrite text directly in the editor as you type instead of simply inserting it.

🎥 Prefer watching a video instead? I got you covered:

Overtype Mode

You can toggle this mode by running a command.

Open the command palette by pressing CTRL + SHIFT + P (or CMD + SHIFT + P on macOS).

Search for and run the View: Toggle Overtype/Insert Mode command.

Once enabled, you’ll notice an OVR (Overtype mode) indicator appears in the Status Bar. You can click it to turn off the mode.

Another way to turn the mode off is by running the View: Toggle Overtype/Insert Mode command again.

In addition, there is a handy setting called editor.overtypeOnPaste that controls what happens when you paste text while in overtype mode:

  • If both overtype mode and editor.overtypeOnPaste are enabled, pasting will overwrite the existing text
  • If overtype mode is enabled but the setting is off, pasting will insert the text without overwriting

I recommend watching the video above to see a complete presentation of this setting.

Change Cursor Style

You can even personalize the cursor style in overtype mode.

This is done using the editor.overtypeCursorStyle setting.

The available cursor styles are:

  • line
  • block (default)
  • underline
  • line-thin
  • block-outline
  • underline-thin

Pick one that works best for you!

That’s it! 🎉

Let me know in the comments if you’ve tried it and how it fits into your coding routine.


Let me know what you think about this article in the comments section below.

If you find this article helpful, please share it with others and subscribe to the blog to support me, and receive a bi-monthly-ish e-mail notification on my latest articles.   
  

Comments