如何阻止VS Code在双击其中一个标签的手柄时最大化编辑组的大小?

huangapple go评论81阅读模式
英文:

How do I stop VS Code from maximizing the size of an editor group when double-clicking one of its tabs' handles?

问题

当双击一个选项卡时,它所在的编辑器组的大小会变大。有时,当我双击鼠标时会发生这种情况,但我不希望编辑器组的大小发生改变。

  • 我知道再次双击可以重置编辑器组的大小,但我需要恢复我设置的大小,而不是默认大小。
  • 我在设置中找不到任何相关的设置。
英文:

When double-clicking a tab, the size of the editor group where it is located becomes larger. Occasionally double-click when my mouse clicks, but I don't want the size of the editor group to change.

  • I know that double-clicking again can reset the size of the editor group, but what I need is to restore the size I set, not the default size.
  • I couldn't find any relevant settings in the Settings.

答案1

得分: 1

看起来双击标签会触发View: Maximize Editor Group命令,然后再次双击会触发View: Reset Editor Group Sizes命令。与此相关的问题,我在这里了解到了这些命令:Stop auto resizing panes when focused #125997

已经创建并合并了一个PR:https://github.com/microsoft/vscode/pull/185966,添加了一个新的设置:workbench.editor.doubleClickTabToToggleEditorGroupSizes。这个更改在VS Code 1.80中发布。

旧回答

我尝试搜索了一下,看是否有方法可以禁用这个功能,但没有找到。编辑器标签的设置通常以“workbench.editor.tab”为前缀,我没有看到一个可以切换此行为的设置。我认为你也不能通过keybindings.json来更改这个,因为那是用于键盘快捷键的,与鼠标按钮没有关系(据我所知)。我倾向于认为你可能没有办法。<strike>你可以尝试提出一个功能请求问题票,要求添加一个设置来支持禁用这个功能。如果你这样做了,请在这里评论并提供链接到你的问题票的链接。</strike> 提问者已经提出了一个功能请求问题票:允许禁用双击最大化编辑组 #185858

英文:

It seems that double clicking a tab invokes the View: Maximize Editor Group command, and then double clicking again invokes View: Reset Editor Group Sizes. Loosely related issue where I learned about those commands: Stop auto resizing panes when focused #125997.

A PR has been made and merged: https://github.com/microsoft/vscode/pull/185966, adding a new setting: workbench.editor.doubleClickTabToToggleEditorGroupSizes. The change is released in VS Code 1.80.

Old answer

I tried googling for a way to disable this and didn't find one. Settings for editor tabs are usually prefixed with "workbench.editor.tab", and I didn't see a setting to toggle this behaviour. I don't think you can change this via keybindings.json either, since that's for keyboard shortcuts and (as far as I know) nothing to do with the mouse buttons. I'm inclined to think you might be out of luck. <strike>You could try raising a feature request issue ticket asking that a setting be added to support disabling this feature. If you do, please comment here with a link to your issue ticket.</strike> The asker has raised a feature-request issue ticket at Allow to disable editor group maximize on double click #185858.

huangapple
  • 本文由 发表于 2023年6月22日 12:48:20
  • 转载请务必保留本文链接:https://go.coder-hub.com/76528677.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定