aizu's Knowledge Base
    • Go to: aizu.my Homepage
    • Recent
    • Tags
    • Register
    • Login

    VS Code - shortcut to increase/decrease font size keyboard shortcut

    Ref
    1
    1
    74
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      aizu
      last edited by aizu

      When click "Command + plus", default command for VS Code is to enlarge the overall UI.

      However, I don't want that action. I only wants the font (code) size increase, instead everything.

      Step 1 - go to settings

      Cmd + Shift + P
      Search for "Preferences: Open Keyboard Shortcut (JSON)"
      

      Step 2 - paste the command below

      // Place your key bindings in this file to override the defaults
      [
          {
              "key": "cmd+numpad_add",
              "command": "editor.action.fontZoomIn"
          },
          {
              "key": "shift+cmd+=",
              "command": "workbench.action.zoomIn"
          },
          {
              "key": "cmd+=",
              "command": "editor.action.fontZoomIn"
          },
          {
              "key": "cmd+numpad_subtract",
              "command": "editor.action.fontZoomOut"
          },
          {
              "key": "shift+cmd+-",
              "command": "workbench.action.zoomOut"
          },
          {
              "key": "cmd+-",
              "command": "editor.action.fontZoomOut"
          },
          {
              "key": "cmd+numpad0",
              "command": "editor.action.fontZoomReset"
          },
          {
              "key": "cmd+0",
              "command": "editor.action.fontZoomReset"
          },
      ]
      
      Adjust code font size

      Command + -
      Command + +

      Adjust VScode UI

      Command + Shift + -
      Command + Shift + +

      Ref: https://code.visualstudio.com/updates/v1_24#_font-zoom-commands
      Ref: https://stackoverflow.com/questions/33701933/how-to-change-environments-font-size

      1 Reply Last reply Reply Quote 0
      • First post
        Last post