diff --git a/assets/keymaps/default-linux.json b/assets/keymaps/default-linux.json index 41415bf2047e1faadd86dd5be159f526d6c57678..54a4f331c0b0c59eca79065fe42c1a8ecbf646b7 100644 --- a/assets/keymaps/default-linux.json +++ b/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", diff --git a/assets/keymaps/default-macos.json b/assets/keymaps/default-macos.json index fa8edbe5c23b008eb2c267850e440a851c54087d..060151c647e42370f5aa0be5d2fa186774c2574d 100644 --- a/assets/keymaps/default-macos.json +++ b/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", diff --git a/assets/keymaps/default-windows.json b/assets/keymaps/default-windows.json index 45f37fbd41af3fcc3108f0ffe150a80ff25332e1..32b52365e08e50266ad5feb7630a7b03f860c8e8 100644 --- a/assets/keymaps/default-windows.json +++ b/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", diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md index 0d0cd35f43610d206749dea7a87af553620633f0..9d1f6f61d446b67256c00bf6322aed73af922c5e 100644 --- a/docs/src/SUMMARY.md +++ b/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) diff --git a/docs/src/tab-switcher.md b/docs/src/tab-switcher.md new file mode 100644 index 0000000000000000000000000000000000000000..5cc72be449c94c38fbe4814893595289cb499b5a --- /dev/null +++ b/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 ctrl key is held down. + +While holding down ctrl, each subsequent tab press cycles to the next item (shift to cycle backwards) and, when ctrl 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 enter to confirm the selected tab and close the switcher +- Press escape 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 |