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
2
2
3
3
4
4
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -67,11 +67,17 @@ active yes yes 'a'
67
67
hidden no yes 'h'
68
68
inactive no no ' '
69
69
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.
72
77
73
78
The main Vim window can hold several split windows. There are also tab pages
74
79
| tab-page | , each of which can hold multiple windows.
80
+
75
81
*window-ID* *winid* *windowid*
76
82
Each window has a unique identifier called the window ID. This identifier
77
83
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
83
89
window number only applies to the current tab, while the window ID can refer
84
90
to a window in any tab.
85
91
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.
89
92
90
93
==============================================================================
91
94
2. Starting Vim *windows-starting*
@@ -391,7 +394,7 @@ CTRL-W CTRL-C *CTRL-W_CTRL-C*
391
394
to the buffer are not written and won't get lost, so this is a
392
395
"safe" command.
393
396
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
395
398
'hidden' is restored after {cmd} has been executed.
396
399
Example: >
397
400
:hide edit Makefile
@@ -485,6 +488,10 @@ These commands can also be executed with ":wincmd":
485
488
:exe nr .. "wincmd w"
486
489
< This goes to window "nr".
487
490
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
+
488
495
==============================================================================
489
496
5. Moving windows around *window-moving*
490
497
0 commit comments