diff --git a/doc/tabpage.jax b/doc/tabpage.jax index e03672b79..6008a9d9c 100644 --- a/doc/tabpage.jax +++ b/doc/tabpage.jax @@ -1,4 +1,4 @@ -*tabpage.txt* For Vim バージョン 9.1. Last change: 2024 Jul 12 +*tabpage.txt* For Vim バージョン 9.1. Last change: 2025 Jun 07 VIMリファレンスマニュアル by Bram Moolenaar @@ -13,7 +13,8 @@ 2. コマンド |tab-page-commands| 3. その他 |tab-page-other| 4. 'tabline' の設定 |setting-tabline| -5. 'guitablabel' の設定 |setting-guitablabel| +5. 'tabpanel' の設定 |setting-tabpanel| +6. 'guitablabel' の設定 |setting-guitablabel| {|+windows| 機能がコンパイル時に無効になっていると、複数のタブページを使用でき ません} @@ -366,9 +367,9 @@ GUI のタブページラインにはポップアップメニューがありま オプション 'tabline' を使って、タブページラベルを好みの表示に設定できます。こ れはあまり簡単ではないので、サンプルを用意してあります。 -基本的には 'statusline' を参照してください。同じアイテムが 'tabline' で使用で -きます。加えて、|tabpagebuflist()|、|tabpagenr()|、|tabpagewinnr()| という関数 -も使えます。 +基本的な情報については、'statusline' オプションを参照ください。同じ項目は +'tabline' および 'tabpanel' オプションでも使用できます。さらに、 +|tabpagebuflist()|、|tabpagenr()|、|tabpagewinnr()| 関数も便利です。 タブページラベルの数は変化するので、オプションには式を使う必要があります。次の ように設定します: > @@ -421,7 +422,64 @@ GUI のタブページラインにはポップアップメニューがありま う。利用できる表示領域はオプション 'columns' を確認してください。 ============================================================================== -5. 'guitablabel' の設定 *setting-guitablabel* +5. 'tabpanel' の設定 *tabpanel* *setting-tabpanel* + +タブパネルは、ウィンドウの横にタブページのラベルを表示する垂直サイドバーです。 +次のように表示されます: +> + +-----------+---------------------------------- + |(1) |text text text text text text text + | ~/aaa.txt|text text text text text text text + |(2) |text text text text text text text + | ~/.vimrc |text text text text text text text + |(3) |text text text text text text text + | ~/bbb.js |text text text text text text text + | ~/ccc.css|text text text text text text text + | |text text text text text text text + | |text text text text text text text + | |text text text text text text text +< +タブパネルを設定するには、以下のオプションを使用します: 'tabpanel'、 +'showtabpanel'、'tabpanelopt'。 +'tabpanel' および 'showtabpanel' オプションは、'statusline' または 'tabline' +オプションと同様の機能を持ちます。 + +'tabpanelopt' オプションの "columns:" 項目は、タブパネルの幅を指定します: +> + +------ この幅 + | + <----+-----> + +-----------+---------------------------------- + |(1) |text text text text text text text + | ~/aaa.txt|text text text text text text text + |(2) |text text text text text text text +< +'tabpanelopt' オプションの "align:" 項目は、タブパネルをウィンドウの左側に表示 +するか右側に表示するかを決定します: +> + +----------------------------------+----------- + |text text text text text text text|(1) + |text text text text text text text| ~/aaa.txt + |text text text text text text text|(2) +< +'tabpanelopt' オプションの "vert" 項目は、タブパネルとウィンドウの表示部分の間 +に垂直セパレーターを表示するかどうかを指定します: +> + +------ ここ + | + v + +-----------+---------------------------------- + |(1) |text text text text text text text + | ~/aaa.txt|text text text text text text text + |(2) |text text text text text text text +< +垂直区切り文字は、'fillchars' の "tpl_vert" から取得されます。 + +ハイライトグループを使用して、タブページラベルの外観をカスタマイズできます: +|hl-TabPanel| |hl-TabPanelSel| |hl-TabPanelFill| + +============================================================================== +6. 'guitablabel' の設定 *setting-guitablabel* GUI のタブページラインが表示されているとき、'guitablabel' を設定してタブページ ラベルの表示方法を指定できます。'tabline' とは違い、一度にタブページライン全体 diff --git a/en/tabpage.txt b/en/tabpage.txt index afc251250..2be0a91e2 100644 --- a/en/tabpage.txt +++ b/en/tabpage.txt @@ -1,4 +1,4 @@ -*tabpage.txt* For Vim version 9.1. Last change: 2024 Jul 12 +*tabpage.txt* For Vim version 9.1. Last change: 2025 Jun 07 VIM REFERENCE MANUAL by Bram Moolenaar @@ -14,7 +14,8 @@ when used in combination with more than one tab page. 2. Commands |tab-page-commands| 3. Other items |tab-page-other| 4. Setting 'tabline' |setting-tabline| -5. Setting 'guitablabel' |setting-guitablabel| +5. Setting 'tabpanel' |setting-tabpanel| +6. Setting 'guitablabel' |setting-guitablabel| {not able to use multiple tab pages when the |+windows| feature was disabled at compile time} @@ -364,8 +365,8 @@ The 'tabline' option allows you to define your preferred way to tab pages labels. This isn't easy, thus an example will be given here. For basics see the 'statusline' option. The same items can be used in the -'tabline' option. Additionally, the |tabpagebuflist()|, |tabpagenr()| and -|tabpagewinnr()| functions are useful. +'tabline' and 'tabpanel' option. Additionally, the |tabpagebuflist()|, +|tabpagenr()| and |tabpagewinnr()| functions are useful. Since the number of tab labels will vary, you need to use an expression for the whole option. Something like: > @@ -418,7 +419,66 @@ clever way when there is not enough room. Check the 'columns' option for the space available. ============================================================================== -5. Setting 'guitablabel' *setting-guitablabel* +5. Setting 'tabpanel' *tabpanel* *setting-tabpanel* + +The tabpanel is a vertical sidebar that displays tab page labels along the +side of the window. It looks like this: +> + +-----------+---------------------------------- + |(1) |text text text text text text text + | ~/aaa.txt|text text text text text text text + |(2) |text text text text text text text + | ~/.vimrc |text text text text text text text + |(3) |text text text text text text text + | ~/bbb.js |text text text text text text text + | ~/ccc.css|text text text text text text text + | |text text text text text text text + | |text text text text text text text + | |text text text text text text text +< +To configure the tabpanel, use the following options: 'tabpanel', +'showtabpanel' and 'tabpanelopt'. +The 'tabpanel' and 'showtabpanel' options function similar to +'statusline' or 'tabline'. + +The "columns:" item of 'tabpanelopt' option specifies the width of the +tabpanel: +> + +------ This width + | + <----+-----> + +-----------+---------------------------------- + |(1) |text text text text text text text + | ~/aaa.txt|text text text text text text text + |(2) |text text text text text text text +< +The "align:" item of the 'tabpanelopt' option determines whether the tabpanel +will be displayed on the left or right side of the window: +> + +----------------------------------+----------- + |text text text text text text text|(1) + |text text text text text text text| ~/aaa.txt + |text text text text text text text|(2) +< +The "vert" item of the 'tabpanelopt' option specifies whether a vertical +separator should be displayed between the tabpanel and the display part of the +window: +> + +------ This is + | + v + +-----------+---------------------------------- + |(1) |text text text text text text text + | ~/aaa.txt|text text text text text text text + |(2) |text text text text text text text +< +The vertical separator character is taken from "tpl_vert" in 'fillchars'. + +You can customize the appearance of the tab page labels using the highlight +groups: |hl-TabPanel| |hl-TabPanelSel| |hl-TabPanelFill| + +============================================================================== +6. Setting 'guitablabel' *setting-guitablabel* When the GUI tab pages line is displayed, 'guitablabel' can be used to specify the label to display for each tab page. Unlike 'tabline', which