在vscode中以垂直分割组打开定义文件的快捷方式 [英] Shortcut for opening the definition file in a split vertical group in vscode

查看:110
本文介绍了在vscode中以垂直分割组打开定义文件的快捷方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在垂直分割组中是否有任何快捷方式来打开定义(例如:方法定义)?通过 ctrl + 单击方法的使用,它将在新选项卡中打开.这很困扰我,因为我必须离开自己的标签.

Are there any shortcuts to open the definition (e.g.: a method definition) in a split vertical group? By ctrl + click on the usage of method, it opens in a new tab. It bothers me, because I have to leave my own tab.

(我知道在新标签页中打开后,通过按 ctrl + \ 可以在新组中将其打开,但这也有相同的问题:我丢失了自己的标签,这是第二个问题:当我要关闭定义文件时,必须同时从第二组和第一组中关闭它.)

(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.)

是否有任何快捷方式可直接在新组中打开定义文件?

Are there any shortcuts to open the definition file directly in a new group?

推荐答案

Ctrl + Alt + 点击似乎可以在其中打开定义文件拆分编辑器.

Ctrl+Alt+Click seems to open the definiton file in a split editor.

它将对您具有此设置的所有内容开放:

It'll open to whatever you have this setting:

Workbench > Editor: Open Side By Side Direction//选项正确且不正确

Workbench > Editor: Open Side By Side Direction // options are right and down

请注意,只有在可能存在单个定义文件的情况下,它才会在拆分编辑器中直接打开定义文件.例如,您可能在源文件夹和dist文件夹中都包含相同的文件(也许在某些任务运行程序命令之后).如果有多个选项,vscode将改为打开一个窥视窗口,并在右侧列出多个引用.您可以 Ctrl + 单击单击要打开到侧面的任何一个.

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). If there is more than one option, vscode will instead open a peek window with the multiple references listed to the right side. You can Ctrl+Click on whichever of those you want to open to the side.

这篇关于在vscode中以垂直分割组打开定义文件的快捷方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆