Skip to content

Instantly share code, notes, and snippets.

@JosephKu
Created March 11, 2015 13:14
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JosephKu/e547c5ec49863c8059fa to your computer and use it in GitHub Desktop.
Save JosephKu/e547c5ec49863c8059fa to your computer and use it in GitHub Desktop.
Enable/Disable key repeat for Sublime Text 2/3 in Vintage/Vintageous mode
#!/bin/sh
sublime_domain=$(defaults domains | tr "," "\n" | grep sublime)
if [ $? -eq 0 ]; then
ret=$(defaults read $sublime_domain ApplePressAndHoldEnabled)
if [ $ret -eq 0 ]; then
defaults write $sublime_domain ApplePressAndHoldEnabled -bool true
echo "Disable key repeat."
else
defaults write $sublime_domain ApplePressAndHoldEnabled -bool false
echo "Enable key repeat."
fi
else
echo "Sublime Text is not installed."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment