duplicate line xcode code example

Example: duplicate line xcode

Go to : /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources

$ sudo nano IDETextKeyBindingSet.plist

ADD THIS TO END OF FILE BEFORE DICT END TAG

<key>Customized</key>
<dict>
  <key>Duplicate Current Line</key>
  <string>selectParagraph:, delete:, undo:, moveRight:, yankAndSelect:</string>
</dict>

restart Xcode and go to Preferences-> Key bindings and search for Duplicate Current Line


This will work with multiple lines and doesn't mess with clipboard
taken from: 
https://stackoverflow.com/questions/10266170/xcode-duplicate-line/41121405#41121405

Tags:

Misc Example