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

<ESC> should quit visual mode #5

Closed
alvivi opened this issue Nov 3, 2011 · 2 comments
Closed

<ESC> should quit visual mode #5

alvivi opened this issue Nov 3, 2011 · 2 comments

Comments

@alvivi
Copy link

alvivi commented Nov 3, 2011

Currently, we have to press again v to quit visual mode.

@sublimehq
Copy link
Collaborator

What version of Sublime Text 2 are you running?

Escape exits visual mode (and visual line mode) when I press it here.

@alvivi
Copy link
Author

alvivi commented Nov 3, 2011

Ok sorry, I updated to the last version and now is working quite right.

By the way, I found another little "bug". V doesn't quit visual line mode when visual line mode is active. I'm not sure what I'm doing (that's why I didn't make a pull request), but I've solved it with this:

class ExitVisualLineMode(sublime_plugin.TextCommand):
    def run(self, edit):
        set_motion_mode(self.view, MOTION_MODE_NORMAL)
        self.view.run_command('shrink_selections')
        self.view.run_command('unmark_undo_groups_for_gluing')
    { "keys": ["V"], "command": "exit_visual_line_mode",
        "context":
        [
            {"key": "setting.command_mode"},
            {"key": "selection_empty", "operator": "equal", "operand": false, "match_all": false}
        ]
    }

@alvivi alvivi closed this as completed Nov 3, 2011
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

No branches or pull requests

1 participant