Skip to content

Commit 0e50ed4

Browse files
authored
Merge pull request #1681 from vim-jp/hh-update-windows
Update windows.{txt,jax}
2 parents 407049f + 09d5cce commit 0e50ed4

File tree

2 files changed

+27
-17
lines changed

2 files changed

+27
-17
lines changed

doc/windows.jax

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*windows.txt* For Vim バージョン 9.1. Last change: 2024 Jul 09
1+
*windows.txt* For Vim バージョン 9.1. Last change: 2024 Sep 08
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -71,27 +71,27 @@
7171
隠れ(hidden) × ○ 'h'
7272
非アクティブ × × ' '
7373

74-
75-
Note: ノーマルコマンドが利用できない、あるいは使い勝手が悪い状況のために、全て
76-
CTRL-Wコマンドは|:wincmd|によっても実行できる。
74+
*buffer-reuse*
75+
個々のバッファには一意な番号が割り振られており、Vim のセッション中は決して変わ
76+
らない。バッファ名とバッファ番号を相互に変換するのには、|bufnr()|
77+
|bufname()| 関数を使える。例外が 1 つある。新しい空のバッファが作成され、それ
78+
が変更されていない場合、そのバッファに別のファイルを読み込む時にそのバッファが
79+
再利用される。これはバッファ番号が変更されないことも意味する。
7780

7881
Vimではウィンドウを複数に分割することができる。タブページ|tab-page|というもの
7982
もあり、タブページは複数のウィンドウを保持することができる。
83+
8084
*window-ID* *winid* *windowid*
8185
個々のウィンドウにはウィンドウIDと呼ばれる一意な識別が与えられる。この識別子は
8286
Vimのセッション中は決して変わらない。|win_getid()||win_id2tabwin()| 関数
83-
は、ウィンドウ/タブ番号を識別子に変換するのに利用できる。似たようなものとして
87+
は、ウィンドウ/タブ番号を識別子に変換するのに使用できる。似たようなものとして
8488
ウィンドウ番号があるが、こちらはウィンドウを開いたり閉じたりするたびに変わる可
8589
能性がある。 |winnr()| を参照。
8690
ウィンドウ番号は1つの特定のタブでのみ有効である。ウィンドウIDは複数のタブで有
8791
効である。ウィンドウIDまたはウィンドウ番号を使用するほとんどの関数では、ウィン
8892
ドウ番号は現在のタブにのみ適用され、ウィンドウIDは任意のタブ内のウィンドウを参
8993
照できる。
9094

91-
個々のバッファには一意な番号が割り振られており、Vimのセッション中は決して変わ
92-
らない。バッファ名とバッファ番号を相互に変換するのには、|bufnr()|
93-
|bufname()| 関数を使える。
94-
9595

9696
==============================================================================
9797
2. Vim の起動 *windows-starting*
@@ -490,12 +490,15 @@ CTRL-W P プレビューウィンドウに移動。プレビューウィンド
490490
:wincmd j
491491
< 下のウィンドウに移動する。
492492
このコマンドは (|CursorHold| 自動コマンドイベントのため) ノー
493-
マルモードが利用できないときやノーマルコマンドが不便なときに有
493+
マルモードが使用できないときやノーマルコマンドが不便なときに有
494494
効である。
495495
count はウィンドウ番号であってもよい。例: >
496496
:exe nr .. "wincmd w"
497497
< これは "nr" 番のウィンドウへ移動する。
498498

499+
Note: すべての CTRL-W コマンドは、ノーマルモードのコマンドが使用できない、また
500+
は不便な場所 (ブラウザーベースの端末等) のために、|:wincmd| でも実行できる。
501+
499502
==============================================================================
500503
5. ウィンドウの移動 *window-moving*
501504

en/windows.txt

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*windows.txt* For Vim version 9.1. Last change: 2024 Jul 09
1+
*windows.txt* For Vim version 9.1. Last change: 2024 Sep 08
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -67,11 +67,17 @@ active yes yes 'a'
6767
hidden no yes 'h'
6868
inactive no no ' '
6969

70-
Note: All CTRL-W commands can also be executed with |:wincmd|, for those
71-
places where a Normal mode command can't be used or is inconvenient.
70+
*buffer-reuse*
71+
Each buffer has a unique number and the number will not change within a Vim
72+
session. The |bufnr()| and |bufname()| functions can be used to convert
73+
between a buffer name and the buffer number. There is one exception: if a new
74+
empty buffer is created and it is not modified, the buffer will be re-used
75+
when loading another file into that buffer. This also means the buffer number
76+
will not change.
7277

7378
The main Vim window can hold several split windows. There are also tab pages
7479
|tab-page|, each of which can hold multiple windows.
80+
7581
*window-ID* *winid* *windowid*
7682
Each window has a unique identifier called the window ID. This identifier
7783
will not change within a Vim session. The |win_getid()| and |win_id2tabwin()|
@@ -83,9 +89,6 @@ across tabs. For most functions that take a window ID or a window number, the
8389
window number only applies to the current tab, while the window ID can refer
8490
to a window in any tab.
8591

86-
Each buffer has a unique number and the number will not change within a Vim
87-
session. The |bufnr()| and |bufname()| functions can be used to convert
88-
between a buffer name and the buffer number.
8992

9093
==============================================================================
9194
2. Starting Vim *windows-starting*
@@ -391,7 +394,7 @@ CTRL-W CTRL-C *CTRL-W_CTRL-C*
391394
to the buffer are not written and won't get lost, so this is a
392395
"safe" command.
393396

394-
:hid[e] {cmd} Execute {cmd} with 'hidden' is set. The previous value of
397+
:hid[e] {cmd} Execute {cmd} with 'hidden' set. The previous value of
395398
'hidden' is restored after {cmd} has been executed.
396399
Example: >
397400
:hide edit Makefile
@@ -485,6 +488,10 @@ These commands can also be executed with ":wincmd":
485488
:exe nr .. "wincmd w"
486489
< This goes to window "nr".
487490

491+
Note: All CTRL-W commands can also be executed with |:wincmd|, for those
492+
places where a Normal mode command can't be used or is inconvenient (e.g.
493+
in a browser-based terminal).
494+
488495
==============================================================================
489496
5. Moving windows around *window-moving*
490497

0 commit comments

Comments
 (0)