microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.61k stars 28.66k forks source link

Insert key doesn't switch to overtype/overwrite mode #1012

Open miroshko opened 8 years ago

miroshko commented 8 years ago

Insert key should switch between insert and overtype modes but it does not.

Version 0.10.3 Commit 783ecf841a2b21edca6d86853670cae89b4c244f Date 2015-11-26T14:10:14.207Z Shell 0.34.1 Renderer 45.0.2454.85 Node 4.1.1 Ubuntu 14.04

stephenmartindale commented 8 years ago

Please fix this! Incidentally, overtype-mode is an open issue in Atom, too: https://github.com/atom/atom/issues/3023

Reproduced in:

VSCode Version: 0.10.11
OS Version: Microsoft Windows 10
pom421 commented 8 years ago

I aggre! For some very special use cases, passing in overtype mode can be very useful (for example to create a padded table in ascii mode). And in OS X there is no physical key to toggle insert/overtype so this future feature will be necessary to be accessed by a command or in the status bar (like Word).

terenceng2010 commented 7 years ago

For example, It would be useful when editing a markdown table.

remcoros commented 7 years ago

I am really missing this while working with markdown tables inside vscode. Also for (now and then) editing fixed width ascii files. Would this be possible with a plugin?

AdamMaras commented 7 years ago

As it turns out, this can be done with an extension. So I did it! I put it together pretty quickly, so it could probably use some shakedown time before a 1.0 release.

octogonz commented 7 years ago

+1 I was shocked to discover that Windows Notepad and MS Word don't support this either. I had assumed that this feature was standard across every text editor.

@AdamMaras have you considered making a PR against VS Code?

AdamMaras commented 7 years ago

@pgonzal I have not, I haven't taken the time to get familiar with the contribution guidelines. Also, since the extension's been installed by a handful of people and I'm getting some feedback, I think I'd like to iterate on it a bit more before proposing adding its behavior directly to Code.

marekr commented 7 years ago

Bump, its so strange its not built into VSCode.

entozoon commented 7 years ago

+1 can't live without this feature.. editing docblocks, etc.

entozoon commented 7 years ago

Thankfully there is a plugin to tide us over in the meantime: https://marketplace.visualstudio.com/items?itemName=adammaras.overtype

antcodd commented 7 years ago

I think this would be a good candidate for an iteration 'Extension Contribution'/integration directed towards improving VsCodeVim integration, while also being useful for others who do not use the extension.

The current R replace mode in VsCodeVim is rather slow. The extension mentioned above is also quite slow.

As mentioned replace/overtype mode is very useful when editing already aligned tables and definitions, especially in block selection mode. Without this I find myself fighting with alignment plugins fixing alignment multiple times when editing a table row.

I currently use a combination of https://marketplace.visualstudio.com/items?itemName=siegebell.incremental-search (Ctrl+D for multiple cursors on steroids) https://marketplace.visualstudio.com/items?itemName=steve8708.Align

'Virtual edit' past the end of the line would also be nice but is more niche.

jez9999 commented 6 years ago

It is perplexing that this is not in VS Code. Would the VS Code team tell us why? Is it a design choice??

ryan-jonesford commented 6 years ago

Any updates on this? I would also really like this feature.

entozoon commented 6 years ago

@ryan-jonesford https://github.com/Microsoft/vscode/issues/1012#issuecomment-309411105

fhurta commented 6 years ago

I was surprised this standard editor feature is missing in VS Code. What's the problem? The issue was filed in 2015. There's even extension created by the community. Is it that hard to implement it? I'm missing here response from VSCode team

cssjr commented 6 years ago

Yeah, some of us older folks still know how to use a keyboard! How can you forget the insert key?

levininja commented 6 years ago

No comment, Microsoft??

stephenmartindale commented 6 years ago

It seems like "overtype" mode is a hot and contentious issue but, frankly, this whole debate is a symptom of a far more serious issue: the "one size fits nobody" approach to modern human-computer interaction design.

Features like these aren't right or wrong: they're preferences. Some want to enable it, some don't, saying that overtype is confusing or somehow difficult to use. One can argue about the correct defaults all day long once it's a preference and not a choice dictated by the current fad or trend but the key thing is to make it a preference. Unfortunately, we are now living in a world where preferences are taboo. Mac keyboards don't even feature an "insert" key and, when I mentioned this to some Mac fans, their response was exactly the same as that of the anti-overtype-types: I don't want that and don't understand why anyone would want it and therefore I conclude that nobody could ever need such a thing.

Alas, I long for the days when one could choose how they wanted to interact with their software and, as muscle memory increased, the only cost that increased was the ever-larger effort required to customise and tweak preferences in any new software that one needed to use.

I know, there's an extension. But I am seriously starting to feel that VS Code relies far, far too heavily on extensions. Extensions should add specific, focused features but basic, basic, basic text-editor functionality that has been standard on PC since the latter half of last century should NOT require the use of an extension.

Please, please fix this. I've been following this issue for over two years, now.

0x3333 commented 6 years ago

This can be accomplished using this:

Overtype for Visual Studio Code

PotcFdk commented 6 years ago

@0x3333 You're late. This has already been mentioned here and here

AlexBillon07 commented 6 years ago

I really miss this feature. Even if the extension looks great, I feel this should be a native feature of the text editor !

apkrieg commented 6 years ago

Need overtype to edit comment blocks. Why is this not part of the editor already?

zwcloud commented 6 years ago

Why is this not part of the editor already?

Maybe this is too hard to achieve.

jez9999 commented 6 years ago

LOL there's an extension that does this already and it's rather simple.

FrankSFLYS commented 6 years ago

It's amazing that a take-for-granted feature is not supported by oneself but provided by an extension!

ceefour commented 6 years ago

@FrankSFLYS Even WordPad which is installed by default on Windows, comes with "Insert key/overtype" support without installing any extensions (and does not even support extensions). It's so weird why the "hatred" for this feature.

addictgamer commented 6 years ago

+1 like and subscribe. Frankly, I was shocked when hitting the insert key a few minutes ago didn't do anything.

KerryHess14 commented 6 years ago

Commenting in the hopes that further public outcry will lead to this being a default feature rather than requiring an extension. *crosses fingers

FauthD commented 6 years ago

+1 Just found this missing mode switch and cannot believe that.

planetrocky commented 6 years ago

Nearly 3 years on and still no update.

MrMcFortna commented 6 years ago

Bump. I echo the sentiments above. When you need this feature, you really need it. Why is this not a standard option for a code editor??

lucask42 commented 6 years ago

+1

basic text editing modes should be supported in a text editor.

nurbles commented 6 years ago

Hard to believe that something as fundamental as this hasn't been fixed in over THREE YEARS! This is an ABSOLUTE necessity in any code editor! Rather than just +1, people should be giving this plus 1,000,000!

ghost commented 6 years ago

@nurbles Those are the right numbers!

On Tue, Aug 21, 2018, 6:23 PM nurbles notifications@github.com wrote:

Hard to believe that something as fundamental as this hasn't been fixed in over THREE YEARS! This is an ABSOLUTE necessity in any code editor! Rather than just +1, people should be giving this plus 1,000,000!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Microsoft/vscode/issues/1012#issuecomment-414713766, or mute the thread https://github.com/notifications/unsubscribe-auth/AVPRpRpyMh2sEnKr9I0vVBfdWzVmdEuuks5uTCYBgaJpZM4GuyZJ .

vilitormanen commented 6 years ago

I'm surprised there is no official comment about the issue. If this is intended and not going to be implemented, please say it in this issue.

cameronove commented 6 years ago

I'm surprised there is no official comment about the issue. If this is intended and not going to be implemented, please say it in this issue.

@vilitormanen 100% agree - what is the stance on this? Can we get an official comment on whether or not your going to work on including this in the main build? Please?

Joey79100 commented 5 years ago

I'm surprised this isn't supported, and no dev seem to even care about it, seeing the lack of answers here. This is a very basic toggle, it's included in the keyboard, so it should be included by default, not through an extension. Otherwise Caps lock could as well be removed from basic features and be included as an extension. Same with Num pad toggle. Or the mouse wheel... the list can go on. I insist, this is a feature of the keyboard, it can be disabled literally just by pressing the corresponding key, so it's not the software that should decide whether to use a keyboard's basic feature or not. At worst, if people are really against having this enabled by default, you can still add a setting to override the keyboard's behavior so it's always Insert, and everyone is happy. But it should be included as a default feature, not with an extension.

remcoros commented 5 years ago

The proposed extension (overtype) registers the 'type' command, which conflicts with other extensions, like VIM, AceJump, Jumpy, etc.

See: https://github.com/Microsoft/vscode/issues/13441

DaveSlinn commented 5 years ago

Count me in the camp of support. I so expected this feature, that I was caught offguard when I clicked the Insert key and it didn't do anything. 15 minutes later, and here I am. And, funny enough, I'm trying to edit a markdown table, like others mentioned. Quickly installed the overtype extension and that works for now, but I did it odd that this isn't built-in.

WorldofBay commented 5 years ago

i can't believe that a modern editor has no built-in way to overtype. however, there's a thing that's disappointing me more and that is that even though alexandrudima and egamma apparently read this in december 2015 (edited labels) and alexandrudima again in november 2017 there isn't a single statement from them even in late 2018.

chrismarch commented 5 years ago

Hmm, wow, I thought this was a modern editor... 2015?!? I guess I need to switch...

oxysoft commented 5 years ago

It's a especially useful when changing values in similar or matching character columns. See the following example:

new Vector3(
   offset.x / period.x,
   offset.x / period.x,
   offset.x / period.x
) * Mathf.PI * 2;

I've just got done copy pasting this line 3 times. As you can see, x needs to be changed in 4 locations. (and no I can't do offset / period, this is with Unity3D) I would go into overwrite, change the first two x on the left, press <END> <LEFT> to move at warp speed and fire away <Z> <UP> <LEFT> <Y>. Without overwrite, I have to introduce 4 new key presses to erase and the hand motion is noticeably more complicated. I bet VS Code developers would lift their hand to pet that mouse instead of using <END>, oof!!!

I have to use the handle of my screwdriver to hammer nails, because the hammer is missing! This is not only a feature, this is an essential tool to professional keyboarding.

cha0s commented 5 years ago

@oxysoft try holding ctrl and clicking after . and before x in the second one on both places. That'll give you 2 'carets'. Then delete and y, then down backspace z :)

Still though, this is just silly that overwrite isn't a thing. Yet another "markdown table" usecase from me.

WorldofBay commented 5 years ago

well that specific use-case is not faster with overtype assuming cursor is just before the third x (first to be changed) with overtype: y down left z end left z up left y without overtype: ctrl + d y down backspace z (actually better approach)

however, there are a lot of use-cases where ctrl + d doesn't work as substitute so you either have to use the mouse (and type single-handed) or do a lot more keystrokes

DaloLorn commented 5 years ago

… Why does this issue even need to exist…?

(On a related note, this discussion explains why I could never use the Insert key in Word... of course a Microsoft function would only be used by non-Microsoft software like OpenOffice. Nothing else would make sense, right?)

nurbles commented 5 years ago

...Why...exist...?

Well, all of Microsoft's other code editor/IDE products support insert/overtype so why shouldn't VSCode? Also, I can speak from experience as someone who has used Microsoft development tools for almost 30 years, it is REALLY frustrating to suddenly need to learn to do without a fundamental editing function.

RogerCD commented 5 years ago

+1

jamilraichouni commented 5 years ago

Must have. Unbelievable that this absolutely common functionality is missing in such a great editor!

octogonz commented 5 years ago

I looked at the plugin, and its implementation is working around a limitation of the underlying Monaco text editor library used by VS Code. I doubt the mainline VS Code would accept this solution.

Perhaps it would be more effective to direct the firehose of community feedback at the Monaco repo, where the real fix needs to occur. ;-) There's already an issue open here: https://github.com/Microsoft/monaco-editor/issues/401

jamilraichouni commented 5 years ago

Ah interesting. But if an extension author found a solution I'd rather expect such workaround being built in since it's really a basic but important feature of a source code editor.