- Open below directory in Finder with Cmnd + Shift + G
/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/
-
Open
IDETextKeyBindingSet.plist
with a text editor (not Xcode's plist editor). -
Add this in:
<key>Insert Newline Before</key>
<string>moveUp:, moveToEndOfLine:, insertNewline:</string>
<key>Insert Newline After</key>
<string>moveToEndOfLine:, insertNewline:</string>
-
Open Xcode and go to
Xcode preferences
->Key Bindings
Search for "insert newline" -
Add shortcuts for new commands.
I navigated (command line) to the proper directory and ran
open IDETextKeyBindingSet.plist
. That opened the file in Xcode and I added the keys and values there. It didn’t seem to save but when I reopened the file it had been changed and I was able to set up my Key Bindings.