tab_switcher: Add documentation for tab switcher (#44189)

Dino created

Release Notes:

- Added documentation for Tab Switcher

Change summary

assets/keymaps/default-linux.json   |  2 
assets/keymaps/default-macos.json   |  2 
assets/keymaps/default-windows.json |  2 
docs/src/SUMMARY.md                 |  1 
docs/src/tab-switcher.md            | 46 +++++++++++++++++++++++++++++++
5 files changed, 50 insertions(+), 3 deletions(-)

Detailed changes

assets/keymaps/default-linux.json 🔗

@@ -616,8 +616,8 @@
       "ctrl-alt-super-p": "settings_profile_selector::Toggle",
       "ctrl-t": "project_symbols::Toggle",
       "ctrl-p": "file_finder::Toggle",
-      "ctrl-tab": "tab_switcher::Toggle",
       "ctrl-shift-tab": ["tab_switcher::Toggle", { "select_last": true }],
+      "ctrl-tab": "tab_switcher::Toggle",
       "ctrl-e": "file_finder::Toggle",
       "f1": "command_palette::Toggle",
       "ctrl-shift-p": "command_palette::Toggle",

assets/keymaps/default-macos.json 🔗

@@ -684,8 +684,8 @@
       "ctrl-alt-cmd-p": "settings_profile_selector::Toggle",
       "cmd-t": "project_symbols::Toggle",
       "cmd-p": "file_finder::Toggle",
-      "ctrl-tab": "tab_switcher::Toggle",
       "ctrl-shift-tab": ["tab_switcher::Toggle", { "select_last": true }],
+      "ctrl-tab": "tab_switcher::Toggle",
       "cmd-shift-p": "command_palette::Toggle",
       "cmd-shift-m": "diagnostics::Deploy",
       "cmd-shift-e": "project_panel::ToggleFocus",

assets/keymaps/default-windows.json 🔗

@@ -608,8 +608,8 @@
       "ctrl-alt-super-p": "settings_profile_selector::Toggle",
       "ctrl-t": "project_symbols::Toggle",
       "ctrl-p": "file_finder::Toggle",
-      "ctrl-tab": "tab_switcher::Toggle",
       "ctrl-shift-tab": ["tab_switcher::Toggle", { "select_last": true }],
+      "ctrl-tab": "tab_switcher::Toggle",
       "ctrl-e": "file_finder::Toggle",
       "f1": "command_palette::Toggle",
       "ctrl-shift-p": "command_palette::Toggle",

docs/src/SUMMARY.md 🔗

@@ -41,6 +41,7 @@
 - [Debugger](./debugger.md)
 - [Diagnostics](./diagnostics.md)
 - [Tasks](./tasks.md)
+- [Tab Switcher](./tab-switcher.md)
 - [Remote Development](./remote-development.md)
 - [Environment Variables](./environment.md)
 - [REPL](./repl.md)

docs/src/tab-switcher.md 🔗

@@ -0,0 +1,46 @@
+# Tab Switcher
+
+The Tab Switcher provides a quick way to navigate between open tabs in Zed. It
+displays a list of your open tabs sorted by recent usage, making it easy to jump
+back to whatever you were just working on.
+
+![Tab Switcher with multiple panes](https://zed.dev/img/features/tab-switcher.png)
+
+## Quick Switching
+
+When the Tab Switcher is opened using {#kb tab_switcher::Toggle}, instead of
+running the {#action tab_switcher::Toggle} from the command palette, it'll stay
+active as long as the <kbd class="keybinding">ctrl</kbd> key is held down.
+
+While holding down <kbd class="keybinding">ctrl</kbd>, each subsequent <kbd
+class="keybinding">tab</kbd> press cycles to the next item (<kbd
+class="keybinding">shift</kbd> to cycle backwards) and, when <kbd
+class="keybinding">ctrl</kbd> is released, the selected item is confirmed and
+the switcher is closed.
+
+## Opening the Tab Switcher
+
+The Tab Switcher can also be opened with either {#action tab_switcher::Toggle}
+or {#action tab_switcher::ToggleAll}. Using {#kb tab_switcher::Toggle} will show
+only the tabs for the current pane, while {#kb tab_switcher::ToggleAll} shows
+all tabs for all panes.
+
+While the Tab Switcher is open, you can:
+
+- Press {#kb menu::SelectNext} to move to the next tab in the list
+- Press {#kb menu::SelectPrevious} to move to the previous tab
+- Press <kbd class="keybinding">enter</kbd> to confirm the selected tab and close the switcher
+- Press <kbd class="keybinding">escape</kbd> to close the switcher and return to the original tab from which
+  the switcher was opened
+- Press {#kb tab_switcher::CloseSelectedItem} to close the currently selected tab
+
+As you navigate through the list, Zed will update the pane's active item to
+match the selected tab.
+
+## Action Reference
+
+| Action                                    | Description                                       |
+| ----------------------------------------- | ------------------------------------------------- |
+| {#action tab_switcher::Toggle}            | Open the Tab Switcher for the current pane        |
+| {#action tab_switcher::ToggleAll}         | Open the Tab Switcher showing tabs from all panes |
+| {#action tab_switcher::CloseSelectedItem} | Close the selected tab in the Tab Switcher        |