Skip to content
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

Corrected handling of Insert key to toggle insert mode #2295

Closed
wants to merge 3 commits into from

Conversation

gibranrosa
Copy link

What this PR does / why we need it: It addresses partially #1787 by including the Insert key in the keys for the CommandInsertAtCursor action, and creating a corresponding extension.vim_insert command to permit the extension to handle the key.

Which issue(s) this PR fixes: partially #1787

Copy link
Member

@jpoon jpoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As our current testing infrastructure doesn't really have a good way of testing this, I presume you've successfully been able to run this locally?

In this PR, do you plan on adding a similar action to toggle between replace and insert?

package.json Outdated
"keywords": [
"vim",
"vi",
"vscodevim"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make the minimal change necessary in this file?

@@ -653,7 +653,7 @@ class CommandMoveHalfPageUp extends CommandEditorScroll {
@RegisterAction
export class CommandInsertAtCursor extends BaseCommand {
modes = [ModeName.Normal];
keys = ['i'];
keys = [['i'], ['<insert>']];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh cool. I don't know why I was surprised at first that the key maps to <insert>.

@VSCodeVim VSCodeVim deleted a comment from TravisBuddy Jan 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants