如何禁用VS Code编辑器,只显示其集成终端?

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

How can I disable the VS Code editor and only show its integrated terminal?

问题

我目前正在为同事建立一个实验室环境。我正在使用 code-server 来实现这个目的。然而,他们不需要使用代码编辑区域,只需要终端窗口就足够了用于学习。我应该如何配置 settings.json 工作区或任何其他配置,以使其不显示文件的编辑区域,只显示纯粹的终端。在启动时,我只需要终端,没有其他东西。这很重要,以避免分散注意力或不必要的文件创建或编辑。

我尝试了下面的配置,但不起作用:

{
    "editor.wordWrap": "off",
    "editor.minimap.enabled": false,
    "workbench.startupEditor": "none",
    "workbench.colorTheme": "Default Dark+",
    "workbench.activityBar.visible": false,
    "workbench.statusBar.visible": false,
    "workbench.sideBar.location": "left",
    "terminal.integrated.defaultLocation": "view",
    "terminal.integrated.defaultProfile.linux": "bash"
}
英文:

I am currently building a lab environment for colleagues. I'm using code-server for that purpose. However, they don't need to use the code editor area, only the Terminal window is enough for learning. How do I configure the settings.json workspace or any configuration anywhere to not show the editor area of files and only show the plane Terminal only. On startup, I just need the Terminal and nothing else. This is important to avoid distractions or any unneeded use of file creation or editing

I tried the below configuration not working:

{
    "editor.wordWrap": "off",
    "editor.minimap.enabled": false,
    "workbench.startupEditor": "none",
    "workbench.colorTheme": "Default Dark+",
    "workbench.activityBar.visible": false,
    "workbench.statusBar.visible": false,
    "workbench.sideBar.location": "left",
    "terminal.integrated.defaultLocation": "view",
    "terminal.integrated.defaultProfile.linux": "bash",
}

答案1

得分: 1

你可以在settings.json中添加以下内容来使工作台始终最大化显示:"workbench.panel.opensMaximized": "always"。至于在启动时打开特定面板,我不太确定如何做到这一点。VS Code会记住工作台的状态,并在重新打开时恢复该状态,所以只要你手动打开终端面板一次,然后在关闭时将其保持打开状态,下次再打开时它就会自动打开终端面板。

我认为没有完全禁用编辑器的方法。

你可能会对这个功能请求感兴趣:Extract the integrated terminal #34442。你可以给这个问题票投上赞成的反应来表示支持,并订阅它以获取有关讨论和进展的通知。但请避免发表像“+1”或“bump”这样的噪音评论。

你可能不感兴趣,但其他人可能会:有一个功能请求,要添加一个用于禁用终端恢复的设置:Missing option for disabling terminal restoration #39137

与此有关:你可能还想修改terminal.integrated.defaultProfile.*设置的值。

英文:

You can get close by putting "workbench.panel.opensMaximized": "always" in settings.json. As for making a particular panel open on startup, I'm not sure how to do that. VS Code remembers the state of the workbench and will restore that state on reopening, so as long as you open the Terminal Panel once manually and then leave it open when you close it, it will open the Terminal Panel again automatically when you open it the next time.

I don't think there's a way to completely disable the editor.

You might be interested in this feature request: Extract the integrated terminal #34442. You can give the issue ticket a thumbs up reaction to show support for it and subscribe to it to get notified about discussion and progress. But please avoid making noisy comments like "+1" / "bump".

You're probably not interested in this, but others might: There's a feature-request to add a setting to disable terminal restoration: Missing option for disabling terminal restoration #39137

Loosely related: You'll probably also want to modify the values of the terminal.integrated.defaultProfile.* settings.

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

发表评论

匿名网友

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

确定