1
- *windows.txt* For Vim version 8.0 . Last change: 2016 Dec 01
1
+ *windows.txt* For Vim version 8.1 . Last change: 2018 Apr 24
2
2
3
3
4
4
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -222,6 +222,11 @@ CTRL-W ^ Does ":split #", split window in two and edit alternate file.
222
222
When a count is given, it becomes ":split #N", split window
223
223
and edit buffer N.
224
224
225
+ *CTRL-W_:*
226
+ CTRL-W : Does the same as typing | : | : edit a command line. Useful in a
227
+ terminal window, where all Vim commands must be preceded with
228
+ CTRL-W or 'termkey' .
229
+
225
230
Note that the 'splitbelow' and 'splitright' options influence where a new
226
231
window will appear.
227
232
@@ -339,8 +344,9 @@ CTRL-W CTRL-C *CTRL-W_CTRL-C*
339
344
*:hide*
340
345
:hid[e]
341
346
:{count} hid[e]
342
- Quit the current window, unless it is the last window on the
343
- screen. For {count} see | :quit | command.
347
+ Without {count} : Quit the current window, unless it is the
348
+ last window on the screen.
349
+ If {count} is given quit the {count} window.
344
350
345
351
The buffer becomes hidden (unless there is another window
346
352
editing it or 'bufhidden' is "unload", "delete" or "wipe").
@@ -613,7 +619,8 @@ The minimal height and width of a window is set with 'winminheight' and
613
619
41. :buffers list of buffers
614
620
615
621
The meaning of [N] depends on the command:
616
- [N] is number of buffers to go forward/backward on ?2, ?3, and ?4
622
+ [N] is the number of buffers to go forward/backward on 2/12/22/32,
623
+ 3/13/23/33, and 4/14/24/34
617
624
[N] is an argument number, defaulting to current argument, for 1 and 21
618
625
[N] is a buffer number, defaulting to current buffer, for 11 and 31
619
626
[N] is a count for 19 and 39
@@ -704,7 +711,6 @@ can also get to them with the buffer list commands, like ":bnext".
704
711
When using the | :tab | modifier each argument is opened in a
705
712
tab page. The last window is used if it's empty.
706
713
Also see | ++opt | and | +cmd | .
707
- {only available when compiled with a GUI}
708
714
709
715
==============================================================================
710
716
8. Do a command in all buffers or windows *list-repeat*
@@ -725,8 +731,7 @@ can also get to them with the buffer list commands, like ":bnext".
725
731
the current window.
726
732
{cmd} can contain '|' to concatenate several commands.
727
733
{cmd} must not open or close windows or reorder them.
728
- {not in Vi} {not available when compiled without the
729
- | +listcmds | feature}
734
+ {not in Vi}
730
735
Also see | :tabdo | , | :argdo | , | :bufdo | , | :cdo | , | :ldo | ,
731
736
| :cfdo | and | :lfdo |
732
737
@@ -754,8 +759,7 @@ can also get to them with the buffer list commands, like ":bnext".
754
759
autocommand event is disabled by adding it to
755
760
'eventignore' . This considerably speeds up editing
756
761
each buffer.
757
- {not in Vi} {not available when compiled without the
758
- | +listcmds | feature}
762
+ {not in Vi}
759
763
Also see | :tabdo | , | :argdo | , | :windo | , | :cdo | , | :ldo | ,
760
764
| :cfdo | and | :lfdo |
761
765
@@ -968,7 +972,6 @@ is no word under the cursor, and a few other things: >
968
972
A hidden buffer is not displayed in a window, but is still loaded into memory.
969
973
This makes it possible to jump from file to file, without the need to read or
970
974
write the file every time you get another buffer in a window.
971
- {not available when compiled without the | +listcmds | feature}
972
975
973
976
*:buffer-!*
974
977
If the option 'hidden' ('hid' ) is set, abandoned buffers are kept for all
@@ -1026,6 +1029,9 @@ list of buffers. |unlisted-buffer|
1026
1029
displayed in a window | hidden-buffer |
1027
1030
- a buffer with 'modifiable' off
1028
1031
= a readonly buffer
1032
+ R a terminal buffer with a running job
1033
+ F a terminal buffer with a finished job
1034
+ ? a terminal buffer without a job: `:terminal NONE`
1029
1035
+ a modified buffer
1030
1036
x a buffer with read errors
1031
1037
@@ -1040,6 +1046,9 @@ list of buffers. |unlisted-buffer|
1040
1046
x buffers with a read error
1041
1047
% current buffer
1042
1048
# alternate buffer
1049
+ R terminal buffers with a running job
1050
+ F terminal buffers with a finished job
1051
+ ? terminal buffers without a job: `:terminal NONE`
1043
1052
Combining flags means they are "and"ed together, e.g.:
1044
1053
h+ hidden buffers which are modified
1045
1054
a+ active buffers which are modified
@@ -1074,10 +1083,8 @@ list of buffers. |unlisted-buffer|
1074
1083
<
1075
1084
1076
1085
:bdelete[!] {bufname} *E93* *E94*
1077
- Like ":bdelete[!] [N] ", but buffer given by name. Note that a
1078
- buffer whose name is a number cannot be referenced by that
1079
- name; use the buffer number instead. Insert a backslash
1080
- before a space in a buffer name.
1086
+ Like ":bdelete[!] [N] ", but buffer given by name, see
1087
+ | {bufname} | .
1081
1088
1082
1089
:bdelete[!] N1 N2 ...
1083
1090
Do ":bdelete[!]" for buffer N1, N2, etc. The arguments can be
@@ -1114,10 +1121,8 @@ list of buffers. |unlisted-buffer|
1114
1121
into a loaded buffer.
1115
1122
1116
1123
:bunload[!] {bufname}
1117
- Like ":bunload[!] [N] ", but buffer given by name. Note that a
1118
- buffer whose name is a number cannot be referenced by that
1119
- name; use the buffer number instead. Insert a backslash
1120
- before a space in a buffer name.
1124
+ Like ":bunload[!] [N] ", but buffer given by name.
1125
+ Also see | {bufname} | .
1121
1126
1122
1127
:N,Mbunload[!] Do ":bunload[!]" for all buffers in the range N to M
1123
1128
| inclusive | .
@@ -1135,10 +1140,16 @@ list of buffers. |unlisted-buffer|
1135
1140
list, without setting the 'buflisted' flag.
1136
1141
Also see | +cmd | .
1137
1142
1138
- :[N] b[uffer][!] [+cmd] {bufname}
1139
- Edit buffer for {bufname} from the buffer list. See
1140
- | :buffer-! | for [!]. This will also edit a buffer that is not
1141
- in the buffer list, without setting the 'buflisted' flag.
1143
+ :[N] b[uffer][!] [+cmd] {bufname} *{bufname}*
1144
+ Edit buffer for {bufname} from the buffer list. A partial
1145
+ name also works, so long as it is unique in the list of
1146
+ buffers.
1147
+ Note that a buffer whose name is a number cannot be referenced
1148
+ by that name; use the buffer number instead.
1149
+ Insert a backslash before a space in a buffer name.
1150
+ See | :buffer-! | for [!].
1151
+ This will also edit a buffer that is not in the buffer list,
1152
+ without setting the 'buflisted' flag.
1142
1153
Also see | +cmd | .
1143
1154
1144
1155
:[N] sb[uffer] [+cmd] [N] *:sb* *:sbuffer*
@@ -1150,7 +1161,7 @@ list of buffers. |unlisted-buffer|
1150
1161
Also see | +cmd | .
1151
1162
1152
1163
:[N] sb[uffer] [+cmd] {bufname}
1153
- Split window and edit buffer for {bufname} from the buffer
1164
+ Split window and edit buffer for | {bufname} | from the buffer
1154
1165
list. This will also edit a buffer that is not in the buffer
1155
1166
list, without setting the 'buflisted' flag.
1156
1167
Note: If what you want to do is split the buffer, make a copy
@@ -1272,6 +1283,9 @@ help Contains a help file. Will only be created with the |:help|
1272
1283
and can't be changed. The 'buflisted' option will be reset
1273
1284
for a help buffer.
1274
1285
1286
+ terminal A terminal window buffer, see | terminal | . The contents cannot
1287
+ be read or changed until the job ends.
1288
+
1275
1289
directory Displays directory contents. Can be used by a file explorer
1276
1290
plugin. The buffer is created with these settings: >
1277
1291
:setlocal buftype=nowrite
0 commit comments