Skip to content

Latest commit

 

History

History
143 lines (96 loc) · 7.11 KB

README.md

File metadata and controls

143 lines (96 loc) · 7.11 KB

overtype for vscode

continuation fork of the project
Extension releases Open VSX Registry Visual Studio Marketplace GitHub issues GitHub pull requests

All Contributors

Because some people actually press the Insert key on purpose.

Features

Adds an overtype mode to vscode based editors, plus a couple of bells and whistles.

Basic usage

The aptly named overtype mode allows one to type over and replace existing characters in one's text editor. The most common scenario for overtype mode is when it's activated by accident by an unsuspecting user who can't figure out why the computer is eating all the words they already typed.

To toggle overtype mode, press the Insert key. If you don't have an Insert key, you can press Ctrl+Shift+I (on Windows and Linux) or Cmd+Shift+I (on Mac). If you don't care for either of those keybindings, you can customize them in your Keyboard Shortcuts preferences; just set your own binding for the overtype.toggle command.
As an alternative you can also click on the Insert/Overtype label to toggle overtype mode.

Basic demo

Global or per-editor

It's bad enough that you have to keep track of that damn overtype indicator at the bottom of the window... but you want to have a separate overtype setting for each editor?

Fine.

"overtype.perEditor": true

Sets the insert/overtype mode per editor.

Paste behavior

If you want to enable "Hard Mode", you can turn on overtype paste mode. This setting applies overtype behavior to when you paste text into your editor. Here are the rules:

  • If you paste part of a line of text into another line of text, the clipboard contents will overwrite characters until it's done pasting, unless it hits the end of the line first, in which case it'll just extend that line.
  • If you already have some text selected when you paste, that text will always be overwritten, even if the contents of the clipboard are smaller.
  • If you paste some multiline text into a line of text, everything left on that line will be overwritten with the first line of the pasted text, and the remaining pasted lines will be inserted below that line.
  • If you cut or copy using vscode's feature that grabs the entire line when you don't have anything selected, pasting that line will overwrite the entire line that you're pasting on.

Some additional tips for using overtype paste:

  • Don't forget your Undo shortcut(s).
  • I know this doesn't work like [insert editor here]. Every single freaking editor handles overtype paste differently. It's not my fault.
  • If you think you have a saner way to handle this, for the love of everything warm and cuddly, MAKE A PULL REQUEST.

Without further ado...

"overtype.paste": true

When in overtype mode, uses overtype behavior when pasting text.

Adjusted indicators in status bar (abbreviated, localized or none)

Horizontal screen space at a premium? Have too many things in your status bar already? Turned your monitor sideways because somebody told you it would increase your productivity by at least 23%? Or simply want to match the language to the general UI? Don't worry, we've got just the setting for you!

"overtype.labelInsertMode": "",
"overtype.labelOvertypeMode": "Ovr"

Shows an abbreviated overtype status (Ovr) in the status bar if active, and nothing for the "normal" insert mode.

"overtype.labelInsertMode": "",
"overtype.labelOvertypeMode": ""

Disable showing the overtype status in the status bar completely.

Overtype cursor style

You can change the overtype cursor style from the preferences. Set the overtype.secondaryCursorStyle to either one of:

  • line
  • line-thin
  • block
  • block-outline
  • underline
  • underline-thin

e.g.

"overtype.secondaryCursorStyle": "underline"

Sets the overtype cursor style.

Contributing

How can you contribute?

Make sure to run npm run lint before pushing

Release notes

There's a CHANGELOG.md file.

License

There's a LICENSE file. It's the BSD 2-Clause license.

Contributors ✨

Thanks goes to these wonderful people:


Simon Sobisch

📆 💻

Adam Maras

💻

Mateusz Przybył

💻

George Melissourgos

📆 💻

Original author: Adam Maras

This project follows the all-contributors specification. Contributions of any kind welcome!