Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mturilin
Created August 11, 2019 21:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mturilin/942455476c55d27f0050792c10e6b516 to your computer and use it in GitHub Desktop.
Save mturilin/942455476c55d27f0050792c10e6b516 to your computer and use it in GitHub Desktop.
Duplicate line for XCode
sudo subl /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/IDETextKeyBindingSet.plist
add the following:
<key>Customized</key>
<dict>
<key>Duplicate Lines</key>
<string>selectLine:, copy:, moveToEndOfLine:, insertNewline:, paste:, deleteBackward:</string>
<key>Duplicate Current Line</key>
<string>moveToBeginningOfLine:, deleteToEndOfLine:, yank:, insertNewline:, moveToBeginningOfLine:, yank:</string>
</dict>
Go to XCode preferences and search for "Duplicate line" command in key bindings to assign the shortcut. I use Shift-Ctrl-D.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment