Efficient development of iOS series--Add delete row, copy row shortcut keys for Xcode
http://blog.csdn.net/biggercoffee/article/details/50513899
During use eclipse
, I like the shortcut keys for deleting a line and copying a line. It happens Xcode
that these two shortcut keys are not supported. Once again, I happened to find a little trick to add these two shortcut keys. The following are the steps:
edit permission
Modify Xcode
the configuration file permissions of the shortcut keys (plist)
, open the terminal and enter the following two commands:
sudo chmod 666 /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet.plist
sudo chmod 777 /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/
Add shortcut
After the permissions are modified, continue to enter the following command in the terminal to open the plist
file for modification (Xcode opens by default), the command is as follows:
open /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet.plist
delete a line
Then find root
the next one andDeletions
add a key below: the value is:Deletions
Delete Current Line
deleteToBeginningOfLine:, moveToEndOfLine:, deleteToBeginningOfLine:, deleteBackward:, moveDown:, moveToBeginningOfLine:
copy a line
Insertions and Indentations
Add two keys under
1. Duplicate Current Line
Value: selectLine:, copy:, moveToEndOfLine:, insertNewline:, paste:, deleteBackward:
2. Insert Line Under
Value: moveToEndOfLine:, insertNewline:
Set shortcut keys
The point is here, restart it Xcode
, and then preferences
find it in there Key Bindings
, you can find Delete Current Line
and Duplicate Current Line
two options, and finally set the shortcut keys you like.
The following two renderings are for reference:
The modified plist file is as follows:
Set shortcut key renderings in Xcode: