Skip to content

Instantly share code, notes, and snippets.

@Overbryd
Created December 8, 2011 09:01
Show Gist options
  • Save Overbryd/1446514 to your computer and use it in GitHub Desktop.
Save Overbryd/1446514 to your computer and use it in GitHub Desktop.
Textmate like key bindings for all Mac OSX input fields
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
Put this file unter ~/Library/KeyBindings/DefaultKeyBinding.dict
Ctrl+Shift+D duplicate line
Ctrl+U uppercase Word/selection
Ctrl+Shift+U lowercase Word/selection
Ctrl+K delete line
Alt+Return insert new line below your cursor
-->
<plist version="1.0">
<dict>
<key>@v</key>
<string>pasteAsPlainText:</string>
<key>^D</key>
<array>
<string>moveToBeginningOfLine:</string>
<string>setMark:</string>
<string>moveToEndOfLine:</string>
<string>deleteToMark:</string>
<string>yank:</string>
<string>insertNewline:</string>
<string>yank:</string>
</array>
<key>^U</key>
<array>
<string>noop:</string>
<string>setMark:</string>
<string>lowercaseWord:</string>
<string>swapWithMark:</string>
</array>
<key>^k</key>
<array>
<string>selectLine:</string>
<string>delete:</string>
</array>
<key>^u</key>
<array>
<string>setMark:</string>
<string>uppercaseWord:</string>
<string>swapWithMark:</string>
</array>
<key>~
</key>
<array>
<string>moveToEndOfLine:</string>
<string>insertNewline:</string>
</array>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment