- Open directory in Finder with Cmd + Shift + G
/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/
-
Open
IDETextKeyBindingSet.plistwith a text editor. -
Add this in:
<key>Duplication</key>
<dict>
<key>Duplicate Selection</key>
<string>selectParagraph:, delete:, undo:, moveRight:, yankAndSelect:</string>
</dict>-
Open Xcode and go to
Xcode->Preferences->Key Bindings->Text tab-> Scroll till you seeDuplication -
Click on
Duplicate Selection, add a shortcut for it, eg.Cmd + D(remove any other bindings for this key)