37

I have a mac at work and want to sync my key bindings at home to it. I don't see an export button in the Preferences menu. Is there some other way to export my custom key bindings?

Wayne Hartman
  • 18,369
  • 7
  • 84
  • 116

4 Answers4

52

From Xcode 5 to Xcode 12 the correct folder you should backup is ~/Library/Developer/Xcode/UserData where you'll find the following items:

  • /Code Snippets Your user generated code snippets: NSHipster on XCode Snippets
  • /FontsAndColorThemes Any default themes you've modified: XCode 5 Themes
  • /KeyBindings Default.keybindings which you can open with xcode (xml/plist): keybindins in xcode 5
  • IDEDocumentationWindow.xcuserstate
  • IDEOrganizerWindowController.xcuserstate
  • IDEPreferencesController.xcuserstate 3 Files that maintain the state for the documentation, organizer and preferences windows.
Dávid Pásztor
  • 51,403
  • 9
  • 85
  • 116
self.name
  • 2,341
  • 2
  • 17
  • 18
  • warning: it seems this file is one way. ie, if you edit it manually, then open xcode, and do anything in keybindings prefs interface, it will be overwritten. – Michael Johnston Sep 14 '15 at 23:21
  • Making an alias - wouldn't that work? It reads the alias file fine, but haven't tried loading it at home yet. – Johan Jan 21 '16 at 16:06
18

In XCode 4.0.2 the key bindings are found in ~/Library/Developer/Xcode/UserData/KeyBindings/

In Xcode 4.3.x and 5.0 the key bindings are in the same place.

TPoschel
  • 3,775
  • 2
  • 30
  • 29
11

IN Xcode 8.x.x the keys bindings are still here

~/Library/Developer/Xcode/UserData/KeyBindings/

Johannes Knust
  • 891
  • 1
  • 11
  • 18
2

You'll find files in ~/Library/Application Support/Xcode/Key Bindings. I imagine you can just copy one of these files and put it in the corresponding place on another machine.

JWWalker
  • 22,385
  • 6
  • 55
  • 76
  • 1
    This answer is now dated. See the answer by @TPoschel for the location used for XCode 4.0.2 – Troy Sep 11 '11 at 20:48