Skip to content

Update tabpage.{txt,jax} #2094

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 64 additions & 6 deletions doc/tabpage.jax
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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| 機能がコンパイル時に無効になっていると、複数のタブページを使用でき
ません}
Expand Down Expand Up @@ -366,9 +367,9 @@ GUI のタブページラインにはポップアップメニューがありま
オプション 'tabline' を使って、タブページラベルを好みの表示に設定できます。こ
れはあまり簡単ではないので、サンプルを用意してあります。

基本的には 'statusline' を参照してください。同じアイテムが 'tabline' で使用で
きます。加えて、|tabpagebuflist()|、|tabpagenr()|、|tabpagewinnr()| という関数
も使えます
基本的な情報については、'statusline' オプションを参照ください。同じ項目は
'tabline' および 'tabpanel' オプションでも使用できます。さらに、
|tabpagebuflist()|、|tabpagenr()|、|tabpagewinnr()| 関数も便利です

タブページラベルの数は変化するので、オプションには式を使う必要があります。次の
ように設定します: >
Expand Down Expand Up @@ -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' とは違い、一度にタブページライン全体
Expand Down
70 changes: 65 additions & 5 deletions en/tabpage.txt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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}
Expand Down Expand Up @@ -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: >
Expand Down Expand Up @@ -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'.
Comment on lines +441 to +442
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここの部分、'tabpanel' が 'statusline' や 'tabline' と似た機能を持つというところはわかるのですが、'showtabpanel' は別でむしろ対応するのは 'laststatus' や 'showtabline' だと思うので、「'tabpanel' と 'showtabpanel' オプションは 'statusline' や 'tabline' オプションと同じ機能を持つ」と言われるとちょっと変な感じがするのですがどうでしょう?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vim-jp/issues#1433 (comment)

typo 報告スレに投げてみました。


The "columns:" item of 'tabpanelopt' option specifies the width of the
tabpanel:
>
+------ This width
|
<----+----->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(翻訳とは直接関係はないです)
この行のインデントがタブではなくスペースで行われているんですが、本当はタブであるべきだったりしますかね?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

いつもの(タブ、スペースのMix)にした方がいいですね。

+-----------+----------------------------------
|(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
Expand Down