-
Notifications
You must be signed in to change notification settings - Fork 29.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding overtype mode #233188
base: main
Are you sure you want to change the base?
Adding overtype mode #233188
Conversation
Just discovered there are unit test failures, will look into this |
Test failure was happening because I forgot to reset the input mode to 'insert' from 'overtype' on suite teardown. |
Without inspecting the code changes it looks to me like this PR could use some squashing of commits. One big is possibly too big, but 26 commits seems too much. Apart from this, will documentation added separately or should this PR also include some? |
Hi this PR is set to squash merge automatically when approved. As for the documentation I am waiting on my colleague's review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I left some comments.
@@ -5951,6 +5988,9 @@ export const EditorOptions = { | |||
tags: ['preview'] | |||
} | |||
)), | |||
overtypeOnPaste: register(new EditorBooleanOption( | |||
EditorOption.overtypeOnPaste, 'overtypeOnPaste', true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this could be implemented differently, maybe via the paste follow-up action that is rendered? That widget allows picking between different paste outcomes when pasting for example code blocks in TypeScript or an image link in markdown.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following our discussion, I think we can implement this as a follow-up action if there is demand for it. Out of the three editors that I have analyzed that allow overtyping on paste, only one seems to have a setting to toggle between the different paste modes and it is the extension Overtype for VS Code. I wonder if we should keep our paste on overtype setting just to mirror this extension which seems to be the go-to extension for our overtype users.
In addition to this, half of the editors I analyzed do not offer overtype on paste mode and pasting just inserts, so I am thinking of keeping the setting but setting it to false.
fixes #1012