简体   繁体   English

vscode中拆分垂直组打开定义文件的快捷方式

[英]Shortcut for opening the definition file in a split vertical group in vscode

Are there any shortcuts to open the definition (eg: a method definition) in a split vertical group?在拆分的垂直组中是否有打开定义(例如:方法定义)的快捷方式? By ctrl + click on the usage of method, it opens in a new tab.通过ctrl +单击方法的用法,它会在新选项卡中打开。 It bothers me, because I have to leave my own tab.这让我很困扰,因为我必须留下自己的标签。

(I know that after opening in a new tab, by pressing ctrl + \ it will be open it in a new group, but this also has the same problem: I lose my own tab, and a second problem: when I want to close the definition file, I have to close it from both the 2nd group and the 1st group.) (我知道在打开新标签后,按ctrl + \会在新组中打开它,但这也有同样的问题:我丢失了自己的标签,第二个问题:当我想关闭时定义文件,我必须从第二组和第一组中关闭它。)

Are there any shortcuts to open the definition file directly in a new group?有没有直接在新组中打开定义文件的快捷方式?

Ctrl + Alt + Click seems to open the definiton file in a split editor. Ctrl + Alt + Click似乎在拆分编辑器中打开定义文件。

It'll open to whatever you have this setting:它会打开任何你有这个设置:

Workbench > Editor: Open Side By Side Direction // options are right and down Workbench > Editor: Open Side By Side Direction // 选项为 right 和 down


Note that it'll directly open the definiton file in a split editor only if there is a single possible defintion file.请注意,仅当存在单个可能的定义文件时,它才会在拆分编辑器中直接打开定义文件。 For example, you may have both a source and a dist folder with the same files in them (after some task runner commands perhaps).例如,您可能同时拥有一个 source 和一个 dist 文件夹,其中包含相同的文件(可能在一些任务运行器命令之后)。 If there is more than one option, vscode will instead open a peek window with the multiple references listed to the right side.如果有多个选项,vscode 将改为打开一个 peek window,并在右侧列出多个引用。 You can Ctrl + Click on whichever of those you want to open to the side.您可以按住 Ctrl单击要打开的任何一个。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM