You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在VSCode中隐藏默认菜单项?解决HiDPI屏幕菜单显示不全问题

Fixing VSCode View Menu Clutter on HiDPI Screens

Hey Igor, sorry to hear you're dealing with this messy, truncated View menu on your 13-inch HiDPI laptop—high-res displays can be finicky with app menus, but we’ve got a straightforward fix for hiding those zoom options you don’t need in the menu.

Since you’re already comfortable with the command panel, this solution won’t take away your ability to access zoom functions when you need them—it just cleans up the View menu so it fits properly and looks neat. Here’s how to do it:

  1. Open your user settings JSON file

    • Bring up the command panel (press Ctrl+Shift+P on Windows/Linux, or Cmd+Shift+P on Mac)
    • Type Preferences: Open User Settings (JSON) and select that option
  2. Add the menu customization config
    Paste this snippet into your settings JSON file (make sure it’s within the curly braces {} of your existing settings):

    "menus": {
        "view/zoom": [
            {
                "command": "workbench.action.zoomIn",
                "when": "false"
            },
            {
                "command": "workbench.action.zoomOut",
                "when": "false"
            },
            {
                "command": "workbench.action.zoomReset",
                "when": "false"
            }
        ]
    }
    
  3. Save and refresh VSCode
    Save the settings file, and you’ll see the Zoom In, Zoom Out, and Reset Zoom options disappear from the View menu right away. If changes don’t show up immediately, a quick restart of VSCode will do the trick.

A quick note: You can still access all zoom functions via the command panel whenever you want—just search for "Zoom In", "Zoom Out", or "Reset Zoom" like you normally would. And if you ever want those menu items back, just delete the snippet above or change "when": "false" to "when": "true".

内容的提问来源于stack exchange,提问作者Igor

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 06:57:16