79430814

Date: 2025-02-11 17:19:57
Score: 0.5
Natty:
Report link

I've found the following to be a simple, successful mix of the previous answers. I've added additional instructions for those unfamiliar with keyboard shortcuts:

  1. Open "Preferences: Open Keyboard Shortcuts (JSON)".

  2. Add these entries to the JSON:

     {
         "key": "alt+[ArrowLeft]",
         "command": "workbench.action.increaseViewSize"
     },
     {
         "key": "alt+[ArrowRight]",
         "command": "workbench.action.decreaseViewSize"
     },
    
  3. Save changes.

  4. Click alt/option key (⎇) and left arrow (←).
    Verify sidebar decreases in size.

  5. Click alt/option key (⎇) and right arrow (→)
    Verify sidebar increases in size.

If your sidebar is on the right, consider swapping the commands in the shortcuts you add.

Benefits:

  1. Allows editing via "Keyboard Shortcuts" interface.
    (cuz it does not require runCommands)
  2. Uses intuitive ← and → keys.
    (from https://stackoverflow.com/a/77051498/11817077)
Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Wesley B