Skip to content

Instantly share code, notes, and snippets.

@rjchatfield
Created June 10, 2014 01:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rjchatfield/c10e98b80617515d5d3d to your computer and use it in GitHub Desktop.
Save rjchatfield/c10e98b80617515d5d3d to your computer and use it in GitHub Desktop.
A simple trick to overcome the most difficult part of Swift "->"

Swift Keybinding

Hate typing -> ? Try this.

  • Use Terminal to open :
subl /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/IDETextKeyBindingSet.plist
  • Add this to the bottom of the file.
  ...
  <dict>
    <key>Type -></key>
    <string>insertText:, -></string>
  </dict>
  ...
  • Save and reopen Xcode.
  • Go to Xcode > Preferences... > Key Bindings.
  • Scroll to the bottom of the list and add your key binding (I chose ^=)
  • Program more productively.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment