Xcode 9 使用 Option-Shift-Command+单击跳转到新选项卡、窗口或其他导航区域中的定义
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/45106679/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode 9 Jump to definition in a new tab, window, or other navigation area with Option-Shift-Command+Click
提问by Maria_C
Xcode 9 seems to be missing jump to definition shortcut Option-Shift-Command+Click. You used to be able to use to open definition in a new tab, window, or other navigation areas with Option-Shift-Command+Click. In Xcode 9 this still works from the file navigator but not when you use this on a class. Has anyone been able to figure out how to use this shortcut in xcode 9?
Xcode 9 似乎缺少跳转到定义快捷方式 Option-Shift-Command+Click。您过去可以使用 Option-Shift-Command+单击在新选项卡、窗口或其他导航区域中打开定义。在 Xcode 9 中,这仍然可以在文件导航器中使用,但在类上使用它时就不行了。有没有人能够弄清楚如何在 xcode 9 中使用这个快捷方式?
回答by Marco Pappalardo
You can use Xcode preferences to personalise the double click and the action selector.
您可以使用 Xcode 首选项来个性化双击和操作选择器。
From this window you can change CMD + click to open the definition instead of the action selector (as it was in Xcode 8)
在此窗口中,您可以更改 CMD + 单击以打开定义而不是操作选择器(就像在 Xcode 8 中一样)
you can also change the behaviour of optional navigation, so that it opens a tab
您还可以更改可选导航的行为,以便它打开一个选项卡
By setting the configuration as shown below, you can CMD + ALT + click to jump to definition in a new tab.
通过如下图设置配置,您可以 CMD + ALT + 单击以跳转到新选项卡中的定义。
This also restores Option-Shift-Command+Click to show the window selector as you wanted
这也会恢复 Option-Shift-Command+Click 以根据需要显示窗口选择器
回答by Bill Feth
Marco's screenshot was helpful.
Marco 的截图很有帮助。
The keyboard commands for Xcode 9 have changed:
Xcode 9 的键盘命令已更改:
Jump to Definition
跳转到定义
- Same window : Command-Control-click(was Command-double-click)
- In assistant pane : Command-Option-Control-click
- In separate window/pane : Command-Option-Control-Shift-click
- 同一窗口:Command-Control-单击(是 Command-双击)
- 在助手窗格中:Command-Option-Control-单击
- 在单独的窗口/窗格中:Command-Option-Control-Shift-click
Quick Help
快速帮助
- Option-click(same as Xcode 8)
- Option-单击(与 Xcode 8 相同)
回答by Maria_C
As soon as I asked a question I found a solution by accident.
我一问问题就偶然找到了解决方案。
- Command + click on the class to bring up the new action selector
- Shift + Alt + Click to chose where to open (tab, new window, etc)
- Command + 单击类以调出新的动作选择器
- Shift + Alt + 单击以选择打开位置(选项卡、新窗口等)
Alternatively, can use Command + Option + Control + Shift to do this all at once but I'm not sure how convenient that is
或者,可以使用 Command + Option + Control + Shift 一次完成所有操作,但我不确定这有多方便
回答by Wanbok Choi
First, Open the file.
首先,打开文件。
Then:
然后:
- New Window :
Cmd
+Shift
+t
- The Assistance Editor :
Cmd
+t
- 新窗口:
Cmd
+Shift
+t
- 协助编辑:
Cmd
+t