Xcode: Delete row shortcut
来源:互联网 发布:网络变压器厂招人吗 编辑:程序博客网 时间:2024/05/28 23:12
Edit the plist file
It's at /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet.plist
Note that:
- the linked answer suggests using XCode for this, but I find that this crashes XCode
- this path is for Lion - it may vary for other OS versions
- you may have to sudo or change permissions to edit this file
- close XCode before editing
Add a new <dict>
element
Add this text just ABOVE the close of the <dict>
at the bottom of this file
<key>Custom</key> <dict> <key>Delete Current Line In One Hit</key> <string>moveToEndOfLine:, deleteToBeginningOfLine:, deleteToEndOfParagraph:</string> </dict>
Note that:
- This is inside the existing
<dict>
so there is a</dict></plist>
after this - This associates the named action "Delete Current Line In One Hit" to the three key actions in the string. I played around with different options here to get the right combination. For instance, if you try moveToBeginningOfLine, deleteToEndOfLine instead of vice versa, then using it on empty lines will delete the line and the entire next line. Which is unpleasant
Save this and open XCode
Add a new key binding in XCode
See the screenshots for this in the linked answer or do this:
- Open XCode Preferences
- Select Key Bindings
- Click on All
- In the SEarch box type "Delete" and search for "Delete Current Line in One Hit"
- Add your new binding.
This should do it but for one caveat. I could never get XCode to save the new binding. The same problem is described here though my workaround had a slight variation:
- Create a duplicate of the Default bindings (hit the + button at the bottom left of the Bindings window and create a duplicate)
- Set the new binding in the duplicate
- Close the preference dialog (that's the variation!)
- Open preferences again and make a new duplicate of the old duplicate and delete the old duplicate.
What a rigmarole, eh? But it works. Now I have Ctrl+D mapped to delete the entire current line in XCode 4.3 on Lion.
也可以参照 http://www.cocoachina.com/industry/20140613/8816.html
0 0
- Xcode: Delete row shortcut
- mac shortcut。 Xcode shortcut
- xcode shortcut
- xcode shortcut keyboard
- List of Xcode Shortcut keys
- javascript table delete row
- JS Delete Table Row
- Tutorials - DOM Table Delete Row
- js dynamic delete a row
- shortcut
- shortcut
- xcode Delete current line
- xcode Delete current line
- csharp DataTable and DataGridView delete a Row
- csharp DataTable and DataGridView delete a Row
- jquey delegate add delete row and column
- Cannot delete or update a parent row
- JS:Insert and Delete row under current line
- hdu 3853 概率DP 简单
- php面向对象之单例模式--125
- Live555分析(一):VS2008编译
- Valid Sudoku and Sudoku Solver leetcode
- 程序员狂想曲
- Xcode: Delete row shortcut
- Android定时器:实现定时的几种方法
- 传值回调
- 目标跟踪的点跟踪技术(5)
- 关于RSA算法密钥长度/密文长度/明文长度
- php面向对象之-魔术方法__set__get__unset__isset的使用-126
- HDU-#1163 Eddy's digital Roots(九余数定理+同余)
- poj1061青蛙的约会(扩展欧几里得)
- 从学c++语言开始到能开发3D游戏需要看的书籍