- 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.
@mahiznan You have to give edit permission to that file (not sure how to do that, chmod on terminal I guess), or copy it and paste to other location (like desktop), open and edit, then paste into the same location (it will ask for the password of the root user), or you can do "sudo nano IDETextKeyBindingSet.plist" with terminal.