修改Xcode
裏快捷鍵的配置文件(plist)
權限,打開終端輸入以下兩條命令:app
sudo chmod 666 /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet.plist sudo chmod 777 /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/
權限修改完之後,在終端裏繼續輸入以下命令打開plist
文件進行修改(默認是Xcode打開),命令以下:spa
open /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet.plist
而後找到root
下的Deletions
,在Deletions
下添加一個key:Delete Current Line
值爲:moveToEndOfLine:, deleteToBeginningOfLine:, deleteToEndOfParagraph:
code
重點來了, 重啓一下Xcode
,而後在preferences
裏找到Key Bindings
,就能找到Delete Current Line
選項了,最後設置本身喜歡的快捷鍵便可it
在Xcode裏設置快捷鍵,選中Delete Current Line
選項,按回車,輸入快捷鍵,設置效果圖以下io