Skip to content

Instantly share code, notes, and snippets.

@ibrahimyilmaz7
Last active February 22, 2022 09:07
Show Gist options
  • Save ibrahimyilmaz7/1503d56fb7d14d9bf3c576e6f3346ba0 to your computer and use it in GitHub Desktop.
Save ibrahimyilmaz7/1503d56fb7d14d9bf3c576e6f3346ba0 to your computer and use it in GitHub Desktop.
Xcode 11 - Duplicate Selection
  1. Open directory in Finder with Cmd + Shift + G
/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/
  1. Open IDETextKeyBindingSet.plist with a text editor.

  2. Add this in:

<key>Duplication</key>
<dict>
    <key>Duplicate Selection</key>
    <string>selectParagraph:, delete:, undo:, moveRight:, yankAndSelect:</string>
</dict>
  1. Open Xcode and go to Xcode -> Preferences -> Key Bindings -> Text tab -> Scroll till you see Duplication

  2. Click on Duplicate Selection, add a shortcut for it, eg. Cmd + D (remove any other bindings for this key)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment