Created
December 28, 2020 14:00
-
-
Save ivmirx/1042692896d1eefbc36612160af4fb2a to your computer and use it in GitHub Desktop.
Key bindings to duplicate and delete lines in Xcode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Nowadays Xcode has a "Delete Line" key binding, but it jumps to the beginning of the next line after deletion. | |
The custom one jumps to the end of the next line. | |
Custom key bindings have to be added after every Xcode update. | |
Open the following file with any text editor: | |
/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet.plist | |
…and insert the following: | |
--> | |
<key>Custom</key> | |
<dict> | |
<key>Custom Delete Line</key> | |
<string>selectLine:, deleteBackward:, moveToEndOfLine:</string> | |
<key>Custom Duplicate Line</key> | |
<string>moveToBeginningOfLine:, deleteToEndOfLine:, yank:, insertNewline:, moveToBeginningOfLine:, yank:</string> | |
</dict> | |
<!-- | |
…right before the closing tags: | |
--> | |
</dict> | |
</plist> | |
<!-- | |
You will need to enter your admin password to save this file. | |
--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment