Standardize UI Navigation with `workbench.action.navigate`
#214,070 opened on 2024年6月1日
Repository metrics
- Stars
- (74,848 stars)
- PR merge metrics
- (平均マージ 11h 43m) (30d で 1,000 merged PRs)
説明
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:
- Navigating Between Panels in the Sidebar:
There is no command to switch between different panels within a sidebar view. For example, I can navigate withinSOLUTION EXPLORER,CORE, orOPEN EDITORS, but I can't move between them. It would be beneficial to useworkbench.action.navigateUpor similar commands to transition between these panels effortlessly.
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
- Navigating Between Views:
Although commands likeworkbench.action.nextSideBarViewexist, they add mental overhead and require additional shortcuts to remember. Integratingworkbench.action.navigateUpto move up to the top and then into theactivityBar(similar toworkbench.action.focusActivityBar) would create a more intuitive experience.
- 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>tosearch.action.focusSearchList). Additionally, some panels, like the test explorer, make it impossible to navigate from input fields to lists of tests without extra steps.
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.