How do I remap escape when in Sublime Text vintage mode?

前端 未结 4 779
感动是毒
感动是毒 2021-02-01 03:40

I am a vim user who is moving to Sublime text and using Vintage mode. In my .vimrc I have the following line:

imap jk 

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-01 04:35

    "Vintage mode is implemented entirely via key bindings and the plugin API - feel free to browse through the Vintage package and see how it's put together. As an example, if you'd like to bind "jj" to exit insert mode, you can add this key binding:"

    { "keys": ["j", "j"], "command": "exit_insert_mode",
        "context":
        [
            { "key": "setting.command_mode", "operand": false },
            { "key": "setting.is_widget", "operand": false }
        ]
    }
    

    Just modify first line to jk if you prefer that.
    Source

提交回复
热议问题