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 vintage vim mode.

Details

  • 2021.06.04.02.50.21
  • github.​com
  • github.​com
  • 4 years ago
  • 2 hours ago
  • 12 years ago

Installs

  • Total 6K
  • Win 3K
  • Mac 2K
  • Linux 1K
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 Jan 14 Jan 13 Jan 12 Jan 11 Jan 10 Jan 9 Jan 8 Jan 7 Jan 6 Jan 5 Jan 4 Jan 3 Jan 2 Jan 1 Dec 31 Dec 30 Dec 29 Dec 28 Dec 27 Dec 26 Dec 25 Dec 24 Dec 23 Dec 22
Windows 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1
Mac 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
Linux 0 0 0 0 0 0 1 0 0 0 0 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 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Sublime Text 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")