xcode KeyBindingSet カスタマイズ
手順としては
- ターミナルを開いて
$ open /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/IDETextKeyBindingSet.plist
を打つ /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/IDETextKeyBindingSet.plist
を読み書き可能に変更/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/
を読み書き可能に変更/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/IDETextKeyBindingSet.plist
を開いて追加したい内容書き込むxcode
を再起動
新しいキーバインドの追加
/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/IDETextKeyBindingSet.plist
を開いて、以下を入力
~省略~ <key>customized</key> <dict> <key>Delete Current Line</key> <string>deleteToBeginningOfLine:, moveToEndOfLine:, deleteToBeginningOfLine:, deleteBackward:, moveDown:, moveToBeginningOfLine:</string> </dict> <key>Edit</key> <dict> <key>Duplicate Line</key> <string>selectLine:, copy:, moveToEndOfLine:, insertNewline:, paste:, deleteBackward:</string> </dict> </dict> </plist>
として保存。
追加した内容を反映
xcodeを再起動して、preferences を開いて KeyBindings を開いて、検索フォームに、上で