Expose the current editor overtype state
When dealing with webviews using the standalone version of Monaco Editor, we'd like to align our environment with the current VS Code state. That means if the user is currently using overtype mode, that should be activated by default in our webviews.
We'd like to have access to:
inputMode: 'insert' | 'overtype'onDidChangeInputMode(...)
Also - please consider to not make this a setting directly but (from the model) local to the current editor window.
This will allow to optionally provide a setting later (was already requested) to toggle overtype mode per editor, not for vscode altogether.
@GitMensch Wouldn't that mean having two states? One global, and one per editor?
If it's only going to be per editor, my request doesn't seem to make sense anymore. I might have misunderstood your comment tho.
One per editor, with the overtype key(s) toggling either all editors at once (current behavior) or only a single one, depending on a new setting like editor.overtypeToggleSingleEditor.
Note that this new non-default setting is requested both in the referenced issue and is a feature of the Overtype extension which also added that because of user request in the first place.
It seems necessary to have an overtype state per editor in its "model" to be able to implement that option.
Maybe I've never encountered the use case, but to me having n states for n editors seems unnecessary complex as built-in behavior.
My opinion is it should stay under https://github.com/DrMerfy/vscode-overtype.
I'm fine with this approach (but in this case there should be a good way of using it by disabling the internal overtype handling - haven't tried but it seems there are problems with that).
In theory that extension may could query/set the global state depending on the editor currently active - but for now we can't query/set the mode, as you've outlined in the topic start.
Any news on this? Even a workaround/hack would be nice to have.
The news seems that this is now in the backlog, along with > 4.6k others...
It's really painful as I also have to stop events from escaping the webview context, otherwise I screw up the VS Code overtype state.
Can this be prioritized please? Not sure how we can build decent UXs without this.