Skip to content

Commit 08083ea

Browse files
authored
Merge pull request #2589 from h-east/update-options
Update options.{txt,jax}
2 parents c271844 + dafacde commit 08083ea

2 files changed

Lines changed: 75 additions & 42 deletions

File tree

doc/options.jax

Lines changed: 40 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*options.txt* For Vim バージョン 9.2. Last change: 2026 Apr 14
1+
*options.txt* For Vim バージョン 9.2. Last change: 2026 Apr 17
22

33

44
VIM リファレンスマニュアル by Bram Moolenaar
@@ -349,14 +349,13 @@ Note: 以下は |global-local| オプションにも適用される。
349349
ていたなら、そのときの値が再び用いられる。そうでなければ、そのバッファが最後に
350350
編集されて閉じられたウィンドウ内の値が用いられる。
351351

352-
特定のバッファの種類についてウィンドウ内のローカルオプションを設定することも可
353-
能である。同じウィンドウ内で別のバッファを編集するときは、ウィンドウについて
354-
ローカルなオプションを使い続けたくはないだろう。そのためVimはウィンドウについ
355-
てローカルなオプションのグローバルな値を記憶しており、別のバッファの編集時には
356-
それを用いる。ウィンドウはそれぞれ、それらの値の独自のコピーを持っている。その
357-
ため、それらのオプションはウィンドウについてはローカルであるが、そのウィンドウ
358-
内の全てのバッファについてグローバルである。それらを用いて、次のようなことが可
359-
能である: >
352+
":setlocal" を使用すると、特定の種類のバッファに対してローカルウィンドウオプ
353+
ションを設定できる。同じウィンドウで別のバッファを編集する場合、これらのローカ
354+
ルウィンドウオプションを使い続ける必要はない。一方、":set" はローカルウィンド
355+
ウオプションのグローバル値も設定する。これは、別のバッファを編集する際に使用さ
356+
れる。各ウィンドウはこれらのグローバル値のコピーを独自に保持するため、ウィンド
357+
ウ内ではローカルだが、ウィンドウ内のすべてのバッファではグローバルになる。これ
358+
を使用すると、以下の操作が可能である: >
360359
:e 一つ目
361360
:set list
362361
:e 二つ目
@@ -7593,18 +7592,35 @@ Note 1番目の形式では、行全体がオプション指定に使われる
75937592
る)
75947593
グローバル/ウィンドウについてローカル |global-local|
75957594
カーソルの上または下には、最低でもこのオプションに指定した数の行が表示
7596-
される。これにより、編集中の箇所の周辺のテキストを見ることができる。
7597-
ても大きい値 (999等) にすると、カーソルの置かれた行は常にウィンドウの
7598-
中央に表示される (ファイル先頭または末尾にいるときと、長い行が折り返さ
7599-
れているとき以外)。
7595+
される。これにより、編集中の箇所の周辺のテキストを見ることができる。
7596+
常に大きな値 (999) に設定すると、カーソル行は常にウィンドウの中央に表
7597+
示される (ファイルの先頭または末尾、または長い行が折り返される場合を除
7598+
く。'scrolloffpad' を参照)。
76007599
ローカル値を使用した後は、次の2つのうちいずれかを使用してグローバル値
76017600
に戻る: >
76027601
setlocal scrolloff<
76037602
setlocal scrolloff=-1
76047603
< 水平スクロールについてはオプション 'sidescrolloff' を参照。
76057604
NOTE: このオプションは、'compatible' がオンになると 0 になるので注意。
76067605

7607-
*'scrollopt'* *'sbo'*
7606+
*'scrolloffpad'* *'sop'*
7607+
'scrolloffpad' 'sop' 数値 (既定では 0)
7608+
グローバル/ウィンドウについてローカル |global-local|
7609+
'scrolloff' と 'scrolloffpad' が 0 より大きい場合、ファイルの末尾でカー
7610+
ソルが中央に留まるようにする。
7611+
通常、'scrolloff' はファイルの末尾でカーソルを中央に維持しない。
7612+
7613+
値が 0 の場合はこの機能が無効になる。0 より大きい値を指定すると有効に
7614+
なる。
7615+
ウィンドウローカル値の場合、-1 はグローバル値を使用することを意味する。
7616+
-1 より小さい値は無効でである。
7617+
7618+
ローカル値を使用した後は、以下の 2 つのいずれかを使用してグローバル値
7619+
に戻すこと: >
7620+
setlocal scrolloffpad<
7621+
setlocal scrolloffpad=-1
7622+
7623+
< *'scrollopt'* *'sbo'*
76087624
'scrollopt' 'sbo' 文字列 (既定では "ver,jump")
76097625
グローバル
76107626
スクロール同期中ウィンドウ {訳注: オプション 'scrollbind' がオンのウィ
@@ -8691,7 +8707,7 @@ Note 1番目の形式では、行全体がオプション指定に使われる
86918707
*stl-%[FuncName]*
86928708
%[ はステータスライン内のクリック可能な領域を定義する。ユーザーがマウ
86938709
スで領域をクリックすると、指定された関数が呼び出される。同じ構文は
8694-
'tabline' でも使用できる。
8710+
'tabline' および 'tabpanel' でも使用できる。
86958711

86968712
%[FuncName] クリック可能な領域の開始位置。"FuncName" は、その領域
86978713
がクリックされたときに呼び出される Vim の関数の名前で
@@ -8710,18 +8726,18 @@ Note 1番目の形式では、行全体がオプション指定に使われる
87108726
"mods" 修飾キー: "s" (Shift)、"c" (Ctrl)、"a" (Alt) の組み合
87118727
わせ。修飾キーがない場合は空文字列。
87128728
"winid" ステータスラインがクリックされたウィンドウの
8713-
|window-ID|、またはクリックが 'tabline' 内で行われた場
8714-
合は 0。
8715-
"area" "statusline" または "tabline"。クリックされた領域がど
8716-
ちらのオプションに属するかを示す。'statusline' と
8717-
'tabline' で単一のコールバックが共有されている場合に便
8718-
利である。
8729+
|window-ID|、またはクリックが 'tabline' または
8730+
'tabpanel' 内で行われた場合は 0。
8731+
"area" "statusline"、"tabline"、または "tabpanel"。クリックさ
8732+
れた領域がどのオプションに属するかを示す。
8733+
"tabnr" (tabpanel のみ) クリックしたラベルのタブページ番号。
87198734

87208735
関数がゼロ以外の値を返した場合、ステータスラインが再描画される。
87218736
ステータスラインをドラッグしてウィンドウのサイズを変更する操作は、ク
8722-
リックハンドラが定義されている場合でも引き続き機能する。'tabline' 内で
8723-
使用される場合、%[FuncName] 領域でのクリックは、デフォルトのタブページ
8724-
選択動作ではなく、コールバックにディスパッチされる。
8737+
リックハンドラが定義されている場合でも引き続き機能する。'tabline' また
8738+
は 'tabpanel' 内で使用される場合、%[FuncName] 領域でのクリックは、デ
8739+
フォルトのタブページ選択動作ではなく、コールバックにディスパッチされ
8740+
る。
87258741

87268742
例: >
87278743
func! ClickFile(info)

en/options.txt

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*options.txt* For Vim version 9.2. Last change: 2026 Apr 14
1+
*options.txt* For Vim version 9.2. Last change: 2026 Apr 17
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -324,12 +324,12 @@ that was last closed are used again. If this buffer has been edited in this
324324
window, the values from back then are used. Otherwise the values from the
325325
last closed window where the buffer was edited last are used.
326326

327-
It's possible to set a local window option specifically for a type of buffer.
328-
When you edit another buffer in the same window, you don't want to keep
329-
using these local window options. Therefore Vim keeps a global value of the
330-
local window options, which is used when editing another buffer. Each window
331-
has its own copy of these values. Thus these are local to the window, but
332-
global to all buffers in the window. With this you can do: >
327+
":setlocal" can be used to set a local window option specifically for a type
328+
of buffer. When you edit another buffer in the same window, you don't want to
329+
keep using these local window options. Meanwhile ":set" also sets a global
330+
value of a local window option, which is used when editing another buffer.
331+
Each window has its own copy of these global values, making them local to the
332+
window, but global to all buffers in the window. With this you can do: >
333333
:e one
334334
:set list
335335
:e two
@@ -7577,16 +7577,33 @@ A jump table for the options with a short description can be found at |Q_op|.
75777577
Minimal number of screen lines to keep above and below the cursor.
75787578
This will make some context visible around where you are working. If
75797579
you set it to a very large value (999) the cursor line will always be
7580-
in the middle of the window (except at the start or end of the file or
7581-
when long lines wrap).
7580+
in the middle of the window (except at the start or end of the file,
7581+
see 'scrolloffpad', or when long lines wrap).
75827582
After using the local value, go back the global value with one of
75837583
these two: >
75847584
setlocal scrolloff<
75857585
setlocal scrolloff=-1
75867586
< For scrolling horizontally see 'sidescrolloff'.
75877587
NOTE: This option is set to 0 when 'compatible' is set.
75887588

7589-
*'scrollopt'* *'sbo'*
7589+
*'scrolloffpad'* *'sop'*
7590+
'scrolloffpad' 'sop' number (default 0)
7591+
global or local to window |global-local|
7592+
When 'scrolloff' and 'scrolloffpad' are greater than zero, allow
7593+
the cursor to remain centered when at the end of the file.
7594+
Normally, 'scrolloff' will not keep the cursor centered at the
7595+
end of the file.
7596+
7597+
A value of 0 disables this feature. Any value above 0 enables it.
7598+
For a window-local value, -1 means to use the global value.
7599+
Values below -1 are invalid.
7600+
7601+
After using the local value, go back the global value with one of
7602+
these two: >
7603+
setlocal scrolloffpad<
7604+
setlocal scrolloffpad=-1
7605+
7606+
< *'scrollopt'* *'sbo'*
75907607
'scrollopt' 'sbo' string (default "ver,jump")
75917608
global
75927609
This is a comma-separated list of words that specifies how
@@ -8672,7 +8689,7 @@ A jump table for the options with a short description can be found at |Q_op|.
86728689
*stl-%[FuncName]*
86738690
%[ defines clickable regions in the statusline. When the user clicks
86748691
on a region with the mouse, the specified function is called. The
8675-
same syntax can also be used in 'tabline'.
8692+
same syntax can also be used in 'tabline' and 'tabpanel'.
86768693

86778694
%[FuncName] Start of a clickable region. "FuncName" is the name
86788695
of a Vim function to call when the region is clicked.
@@ -8691,16 +8708,16 @@ A jump table for the options with a short description can be found at |Q_op|.
86918708
"mods" Modifier keys: combination of "s" (shift), "c" (ctrl),
86928709
"a" (alt). Empty string if no modifiers.
86938710
"winid" |window-ID| of the window whose statusline was clicked,
8694-
or 0 when the click was in 'tabline'.
8695-
"area" "statusline" or "tabline". Indicates which option the
8696-
clicked region belongs to. Useful when a single
8697-
callback is shared between 'statusline' and 'tabline'.
8711+
or 0 when the click was in 'tabline' or 'tabpanel'.
8712+
"area" "statusline", "tabline", or "tabpanel". Indicates
8713+
which option the clicked region belongs to.
8714+
"tabnr" (tabpanel only) Tab page number of the clicked label.
86988715

86998716
If the function returns non-zero, the statusline is redrawn.
87008717
Dragging the statusline to resize the window still works even when
8701-
click handlers are defined. When used in 'tabline', clicks in
8702-
%[FuncName] regions are dispatched to the callback instead of the
8703-
default tab page selection behavior.
8718+
click handlers are defined. When used in 'tabline' or 'tabpanel',
8719+
clicks in %[FuncName] regions are dispatched to the callback
8720+
instead of the default tab-selection behavior.
87048721

87058722
Example: >
87068723
func! ClickFile(info)

0 commit comments

Comments
 (0)