first we have to get the terminology right, when we say short-cut, it is interchangeable with the terms "keybindings", or the "hot-keys".
In Mac, you can actually define your own key bindings. the things to od is to create entries in the files under ~/Library/KeyBindings/PBKeyBinding.dict with the fllowing content and restart XCode.
{
"^$K" = (
"selectLine:",
"cut:"
);
"^$D" = (
"selectLine:",
"copy:",
"moveToEndOfLine:",
"insertNewline:",
"paste:",
"deleteBackward:"
);
} This will create two hot-keys, one Ctrl+Shift+K for deleting the current line and the Ctrl-Shift-D for duplicating the current line.
or from another post, that you can set the delete line selected (or where the cursor is at )
{
"^D" = (
"moveToBeginningOfLine:",
"deleteToEndOfLine:",
);
}
References:
本文介绍了如何在XCode中自定义快捷键以提高开发效率。通过编辑~/Library/KeyBindings/PBKeyBinding.dict文件,可以实现删除当前行、复制当前行等功能。

被折叠的 条评论
为什么被折叠?



