From 864ac61848f812ce1daa9fcab3087cd52e0ec684 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 24 Jun 2024 23:10:11 +0800 Subject: [PATCH] docs(help): update doc for tabline --- autoload/SpaceVim/layers/core/tabline.vim | 59 +++++++++++++++++++++-- doc/SpaceVim.txt | 58 ++++++++++++++++++++-- 2 files changed, 111 insertions(+), 6 deletions(-) diff --git a/autoload/SpaceVim/layers/core/tabline.vim b/autoload/SpaceVim/layers/core/tabline.vim index 80c77289a..0b31772b0 100644 --- a/autoload/SpaceVim/layers/core/tabline.vim +++ b/autoload/SpaceVim/layers/core/tabline.vim @@ -22,10 +22,63 @@ " enabled by default. " " @subsection Key bindings +" +" The following two key bindings require neovim v0.10.0+. " > -" Key binding Description -" Ctrl-Shift-Right Move current tabpage to the right -" Ctrl-Shift-Left Move current tabpage to the left +" Key binding | Description +" ----------------- | ----------------------------------------------- +" Ctrl-Shift-Right | Move current tabpage to the right +" Ctrl-Shift-Left | Move current tabpage to the left +" < +" @subsection Use Tabline +" +" Buffers will be listed on the tabline if there is only one tab, each item contains +" the index, buffer name and the filetype icon. If there is more than one tab, all +" of them will be listed on the tabline. Each item can be quickly accessed by using +" ` number`. Default `` is `\`. +" > +" Key Bindings | Descriptions +" ------------ | ----------------------------------------------- +" 1 | Jump to index 1 on tabline +" 2 | Jump to index 2 on tabline +" 3 | Jump to index 3 on tabline +" 4 | Jump to index 4 on tabline +" 5 | Jump to index 5 on tabline +" 6 | Jump to index 6 on tabline +" 7 | Jump to index 7 on tabline +" 8 | Jump to index 8 on tabline +" 9 | Jump to index 9 on tabline +" g r | Switch to alternate tab (switch back and forth) +" < +" NOTE: `SPC Tab` is the key binding for switching to alternate buffer. +" Read [Buffers and Files](#buffers-and-files) section for more info. +" +" SpaceVim tabline also supports mouse click, the left mouse button will switch to the buffer, +" while the middle mouse button will delete the buffer. +" +" NOTE: This feature is only supported in Neovim with `has('tablineat')`. +" > +" Key Bindings | Descriptions +" ---------------- | -------------------- +" | Switch to the buffer +" | Delete the buffer +" < +" @subsection Tab manager +" +" You can also use `SPC t t` to open the tab manager window. +" +" Key bindings within the tab manager window: +" > +" Key Bindings | Descriptions +" ----------------- | ----------------------------------------- +" o | Close or expand tab windows. +" r | Rename the tab under the cursor. +" n | Create new named tab below the cursor tab +" N | Create new tab below the cursor tab +" x | Delete the tab +" Ctrl-Shift-Up | Move tab backward +" Ctrl-Shift-Down | Move tab forward +" | Switch to the window under the cursor. " < scriptencoding utf-8 diff --git a/doc/SpaceVim.txt b/doc/SpaceVim.txt index 27ce96f0b..3ad4cd434 100644 --- a/doc/SpaceVim.txt +++ b/doc/SpaceVim.txt @@ -2105,10 +2105,62 @@ enabled by default. KEY BINDINGS +The following two key bindings require neovim v0.10.0+. > - Key binding Description - Ctrl-Shift-Right Move current tabpage to the right - Ctrl-Shift-Left Move current tabpage to the left + Key binding | Description + ----------------- | ----------------------------------------------- + Ctrl-Shift-Right | Move current tabpage to the right + Ctrl-Shift-Left | Move current tabpage to the left +< +USE TABLINE + +Buffers will be listed on the tabline if there is only one tab, each item +contains the index, buffer name and the filetype icon. If there is more than +one tab, all of them will be listed on the tabline. Each item can be quickly +accessed by using ` number`. Default `` is `\`. +> + Key Bindings | Descriptions + ------------ | ----------------------------------------------- + 1 | Jump to index 1 on tabline + 2 | Jump to index 2 on tabline + 3 | Jump to index 3 on tabline + 4 | Jump to index 4 on tabline + 5 | Jump to index 5 on tabline + 6 | Jump to index 6 on tabline + 7 | Jump to index 7 on tabline + 8 | Jump to index 8 on tabline + 9 | Jump to index 9 on tabline + g r | Switch to alternate tab (switch back and forth) +< +NOTE: `SPC Tab` is the key binding for switching to alternate buffer. Read +[Buffers and Files](#buffers-and-files) section for more info. + +SpaceVim tabline also supports mouse click, the left mouse button will switch +to the buffer, while the middle mouse button will delete the buffer. + +NOTE: This feature is only supported in Neovim with `has('tablineat')`. +> + Key Bindings | Descriptions + ---------------- | -------------------- + | Switch to the buffer + | Delete the buffer +< +TAB MANAGER + +You can also use `SPC t t` to open the tab manager window. + +Key bindings within the tab manager window: +> + Key Bindings | Descriptions + ----------------- | ----------------------------------------- + o | Close or expand tab windows. + r | Rename the tab under the cursor. + n | Create new named tab below the cursor tab + N | Create new tab below the cursor tab + x | Delete the tab + Ctrl-Shift-Up | Move tab backward + Ctrl-Shift-Down | Move tab forward + | Switch to the window under the cursor. < ==============================================================================