ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Vintage Escape

by tonymagro ALL

Closes the completion menu and exits insert mode when escape is pressed in Sublime Text 2 and 3 vintage vim mode.

Details

  • 2013.06.14.21.35.56
  • github.​com
  • github.​com
  • 7 years ago
  • 2 hours ago
  • 7 years ago

Installs

  • Total 5K
  • Win 2K
  • Mac 2K
  • Linux 902
Feb 29 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13 Feb 12 Feb 11 Feb 10 Feb 9 Feb 8 Feb 7 Feb 6 Feb 5 Feb 4 Feb 3 Feb 2 Feb 1 Jan 31 Jan 30 Jan 29 Jan 28 Jan 27 Jan 26 Jan 25 Jan 24 Jan 23 Jan 22 Jan 21 Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15
Windows 0 1 0 0 0 1 1 1 1 1 0 0 0 0 0 2 0 0 0 0 0 1 0 0 1 0 1 1 0 1 0 1 1 1 0 0 0 0 0 0 0 0 1 0 0 1
Mac 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 2 2 0 0 0 0 0 0 1 2 0 0 0 0 1 0 1 0 0 1 1 0 0 2
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 2 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0

Readme

Source
raw.​githubusercontent.​com

Sublime Text 2 & 3 plugin that makes vintage mode close the completion menu and enter normal mode when escape is pressed.

Default key bindings:

{ "keys": ["escape"], "command": "exit_auto_complete_and_insert_mode", "context":
    [
        { "key": "auto_complete_visible", "operator": "equal", "operand": true }
    ]
},

{ "keys": ["ctrl+["], "command": "exit_auto_complete_and_insert_mode", "context":
    [
        { "key": "auto_complete_visible", "operator": "equal", "operand": true }
    ]
},

The entire plugin consists of:

import sublime_plugin
class ExitAutoCompleteAndInsertMode(sublime_plugin.TextCommand):
    def run(self, edit):
        self.view.run_command("hide_auto_complete")
        self.view.run_command("exit_insert_mode")