本文介绍了VSCode:在新窗口中打开选择的命令是什么(垂直拆分?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在 QuickOpen 中时:

When I am in QuickOpen:

我想使用ctrl-v"在拆分窗口中打开此文件.

I would like to use "ctrl-v" to open this file in a split window.

目前,我可以在此 QuickOpen 对话框中通过cmd+enter"来执行此操作.

Currently, I can do so with by "cmd+enter" in this QuickOpen dialog.

我似乎无法在默认的键绑定 json 中找到此键的绑定.

I can't seem to find the keybinding for this in the default keybinding json.

有人可以帮我吗?

{
    "key": "ctrl+v"
    "command": <--
    "when": "inQuickOpen"
},

推荐答案

在 v1.44 中:

打开编辑器的新命令

新命令 workbench.action.alternativeAcceptSelectedQuickOpenItem允许绑定一个键来打开文件或符号,从快速打开到一边.

A new command workbench.action.alternativeAcceptSelectedQuickOpenItem allows to bind a key to open files or symbols from quick open to the side.

来自 https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_44.md#quick-open-rewrite

所以我认为这会奏效:

{
  "key": "ctrl+v",
  "command": "workbench.action.alternativeAcceptSelectedQuickOpenItem",
  "when": "inQuickOpen"
},

在 vscode v1.44 的标准版本中测试:这确实有效.它将在 QuickOpen 面板中的拆分编辑器中打开文件.


Tested in standard version of vscode v1.44: this does work. It will open a file in a split editor from the QuickOpen panel.

我假设你已经有了设置

编辑器:并排打开方向

设置为down.只有其他选项是正确.

set to down. Only other option is right.

这篇关于VSCode:在新窗口中打开选择的命令是什么(垂直拆分?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 11:14