Skip to content

Instantly share code, notes, and snippets.

@cbess
Last active March 16, 2020 06:10
Show Gist options
  • Select an option

  • Save cbess/4444374 to your computer and use it in GitHub Desktop.

Select an option

Save cbess/4444374 to your computer and use it in GitHub Desktop.
Xcode Delete and Duplicate Selected Lines
<key>Customized</key>
<dict>
<key>Delete Line</key>
<string>selectLine:, deleteBackward:</string>
<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>
@cbess
Copy link
Copy Markdown
Author

cbess commented Jan 30, 2013

Edit file, in Xcode 4-6.x:
/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/IDETextKeyBindingSet.plist

@cbess
Copy link
Copy Markdown
Author

cbess commented Apr 7, 2015

Still works in Xcode 6.x

@eladg
Copy link
Copy Markdown

eladg commented Nov 19, 2015

still works on 7.0.1, thanks!

@bluemix
Copy link
Copy Markdown

bluemix commented Mar 5, 2016

worked with me
Xcode 7.2.1

@lemonlab
Copy link
Copy Markdown

works perfectly, thanks !

@spiridonkopicl
Copy link
Copy Markdown

works on xcode 8 beta, thx

@zeeshanz
Copy link
Copy Markdown

zeeshanz commented Oct 2, 2016

Doesn't work on Version 8.0 (8A218a). Modifying the IDETextKeyBindingSet.plist file results in Xcode not behaving properly, e.g. the arrow keys stop working.

@cbess
Copy link
Copy Markdown
Author

cbess commented Dec 17, 2016

For Xcode 8+, you can now get Text Toolset - Source Editor Extension which has these features and more.

@deda9
Copy link
Copy Markdown

deda9 commented Dec 23, 2016

Awesome worked on Xcode 8.1. Thanks alot

@amine2233
Copy link
Copy Markdown

amine2233 commented Feb 27, 2017

work for Xcode 8.3 Thanks

@hsleedevelop
Copy link
Copy Markdown

Doesn't work on XCode 8.3(8E162) on today

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