with Sublime Text 2's vintage
mode, it's quite annoying when you're not use U.S.
keyboard.
well, this small applescript will help you.
open AppleScript Editor
and copy content of select-us-keyboard.applescript
.
save it into <sublime packages directory>/Vintage
.
add following code snippet to vintage.py
.
# select u.s. keyboard layout
if (self.view.id() == self.view.window().active_view().id()):
script_path = sublime.packages_path() + "/Vintage/select-us-keyboard.scpt"
subprocess.Popen(["osascript",script_path], stdout=subprocess.PIPE).communicate()[0]
(don't forget to import subprocess
module!!!)
now whenever you exit insert mode, sublime will select U.S.
keyboard layout automatically :)