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

Fix visual mode activated on insert mode #168

Merged
merged 2 commits into from
Mar 1, 2016
Merged

Conversation

frarees
Copy link
Contributor

@frarees frarees commented Feb 29, 2016

No description provided.

@@ -40,6 +40,9 @@ export class VisualMode extends Mode {
}

shouldBeActivated(key: string, currentMode: ModeName): boolean {
if (currentMode !== ModeName.Normal) {
return false;
}
return key === "v";
Copy link
Member

Choose a reason for hiding this comment

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

I think it's simpler if you do this:

return key === "v" && currentMode === ModeName.Normal

Can you also add in the modeNormal.ts that is you are in Visual Mode and v is entered, it should go to Normal Mode?

Copy link
Member

Choose a reason for hiding this comment

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

Whoa, been using vim for ages and never knew that v in visual mode brings you out of visual mode!

Copy link
Member

Choose a reason for hiding this comment

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

I'm in the same boat -- learning a lot of little things here and there building out this extension.

@frarees
Copy link
Contributor Author

frarees commented Mar 1, 2016

@jpoon yeah let me revise it. Later today I will push some changes.

jpoon added a commit that referenced this pull request Mar 1, 2016
Fix visual mode activated on insert mode
@jpoon jpoon merged commit 4caa813 into VSCodeVim:master Mar 1, 2016
@jpoon
Copy link
Member

jpoon commented Mar 1, 2016

Thanks @frarees

@frarees frarees deleted the vmode_fix branch March 4, 2016 10:22
This pull request was closed.
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.

3 participants