- 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 haven’t tried yet. Good reminder for me to upgrade to Ventura though. I’ll try to update this tomorrow.