Skip to content

Instantly share code, notes, and snippets.

@theptrk
Last active May 10, 2020 00:34
Show Gist options
  • Save theptrk/c2436db9d197798d9f2ed3cf50206d1f to your computer and use it in GitHub Desktop.
Save theptrk/c2436db9d197798d9f2ed3cf50206d1f to your computer and use it in GitHub Desktop.
Sublime Text vim (vintage) remap `jj` to exit
  • Go to Sublime Text -> Preferences -> Key Bindings and add this to your Default (OSX).sublime-keymap
[
    {
        "keys": ["j", "j"],
        "command": "_enter_normal_mode",
        "args": {
            "mode": "mode_insert"
        },
        "context": [{"key": "vi_insert_mode_aware"}]
    }
]

Other great options for exit are fd and jk

  • Importantly, remember to set key repeat on for Mac, run this in your terminal
$ defaults write com.sublimetext.3 ApplePressAndHoldEnabled -bool false
@daudahmad
Copy link

Thanks!

@theptrk
Copy link
Author

theptrk commented Oct 5, 2019

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment