microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.96k stars 29.18k forks source link

Standardize UI Navigation with `workbench.action.navigate` #214070

Open PascalSenn opened 5 months ago

PascalSenn commented 5 months ago

Is your feature request related to a problem? Please describe.

As a heavy keyboard user, I prefer using consistent keybindings (similar to vim) to navigate throughout the UI.

Describe the solution you would like

Currently, there is no universal way to navigate within the sidebars. While commands exist to focus on elements like the editor or testing, navigating between different views remains cumbersome.

In VIM, ctrl+w h/j/k/l allows seamless movement between splits. A similar approach in VS Code can be achieved using the workbench.action.navigateXYZ command family. However, these commands do not function effectively within sidebars. Here are some specific issues and proposed solutions:

  1. Navigating Between Panels in the Sidebar:
    There is no command to switch between different panels within a sidebar view. For example, I can navigate within SOLUTION EXPLORER, CORE, or OPEN EDITORS, but I can't move between them. It would be beneficial to use workbench.action.navigateUp or similar commands to transition between these panels effortlessly. image

The following sequence of clicks is not doable with just the keyboard:

https://github.com/dotnet/vscode-csharp/assets/14233220/94e89bbb-75ad-4d92-93d8-7b5fead280d5

  1. Navigating Between Views:
    Although commands like workbench.action.nextSideBarView exist, they add mental overhead and require additional shortcuts to remember. Integrating workbench.action.navigateUp to move up to the top and then into the activityBar (similar to workbench.action.focusActivityBar) would create a more intuitive experience.

image

  1. Navigating Inside Panes:
    Some panels restrict movement within certain areas. For instance, the search panel locks you in the search field, and exiting requires custom remappings (e.g., mapping <enter> to search.action.focusSearchList). Additionally, some panels, like the test explorer, make it impossible to navigate from input fields to lists of tests without extra steps. image

The ideal outcome would be that there is one way to navigate through all of the described scenarios.With this, ctrl+w h/j/k/l would make all of the IDE accessible by keyboard.

Applicable Scenarios

Daily use for improved efficiency and ease of navigation.

Describe alternatives you've considered

Attempting to configure existing commands for this functionality, but the current options are limited.

Additional context

-

benibenj commented 4 months ago

Related https://github.com/microsoft/vscode/issues/170200