Last active
December 4, 2023 03:40
-
-
Save kconragan/2510186 to your computer and use it in GitHub Desktop.
Enable key repeat in Apple Lion for Sublime Text in Vim mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key | |
# that enables you to choose a character from a menu of options. If you are on Lion | |
# try it by pressing and holding down 'e' in any app that uses the default NSTextField | |
# for input. | |
# | |
# It's a nice feature and continues the blending of Mac OS X and iOS features. However, | |
# it's a nightmare to deal with in Sublime Text if you're running Vintage (Vim) mode, | |
# as it means you cannot press and hold h/j/k/l to move through your file. You have | |
# to repeatedly press the keys to navigate. | |
# You can disable this feature for just Sublime Text by issuing the following command | |
# in your terminal (*not* the Sublime Text console): | |
defaults write com.sublimetext.3 ApplePressAndHoldEnabled -bool false | |
# Note: replace com.sublimetext.3 with whichever version of Sublime Text you are running | |
# eg. 'com.sublimetext.2' | |
# Alternately, if you want this feature disabled globally, you can enter this: | |
defaults write -g ApplePressAndHoldEnabled -bool false | |
# In either case you'll need to restart Sublime Text for the change to take place. | |
# Happy coding! |
Only works for me if I turn off press and hold globally. Tried multiple things but couldn't get it to deactivate only for Sublime Text (macOS Big Sur 11.4).
I confirm that to make this work in Sublime Text released on May 21, 2021, aka Sublime Text 4 aka Build 4107 aka ST4, the solution provided above by @eproxus works.
defaults write com.sublimetext.4 ApplePressAndHoldEnabled -bool false
2022 , Sublime 4 . Technique Still works !
Great tip. Thanks !
Still works with Sublime 4, so happy this is a thing 💯
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For anyone on the Sublime Text 4 dev version just change the version to 4: