Skip to content

Commit f1c9c25

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 009fd88 + ff1e879 commit f1c9c25

41 files changed

Lines changed: 1104 additions & 236 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

runtime/doc/autocmd.txt

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*autocmd.txt* For Vim version 8.0. Last change: 2018 Feb 10
1+
*autocmd.txt* For Vim version 8.0. Last change: 2018 Mar 05
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -21,7 +21,6 @@ For a basic explanation, see section |40.3| in the user manual.
2121
11. Disabling autocommands |autocmd-disable|
2222

2323
{Vi does not have any of these commands}
24-
{only when the |+autocmd| feature has not been disabled at compile time}
2524

2625
==============================================================================
2726
1. Introduction *autocmd-intro*
@@ -258,6 +257,7 @@ Name triggered by ~
258257
|BufCreate| just after adding a buffer to the buffer list
259258
|BufDelete| before deleting a buffer from the buffer list
260259
|BufWipeout| before completely deleting a buffer
260+
|TerminalOpen| after a terminal buffer was created
261261

262262
|BufFilePre| before changing the name of the current buffer
263263
|BufFilePost| after changing the name of the current buffer
@@ -286,7 +286,8 @@ Name triggered by ~
286286
|GUIFailed| after starting the GUI failed
287287
|TermResponse| after the terminal response to |t_RV| is received
288288

289-
|QuitPre| when using `:quit`, before deciding whether to quit
289+
|QuitPre| when using `:quit`, before deciding whether to exit
290+
|ExitPre| when using a command that may make Vim exit
290291
|VimLeavePre| before exiting Vim, before writing the viminfo file
291292
|VimLeave| before exiting Vim, after writing the viminfo file
292293

@@ -324,6 +325,14 @@ Name triggered by ~
324325
|CmdwinEnter| after entering the command-line window
325326
|CmdwinLeave| before leaving the command-line window
326327

328+
|CmdlineChanged| after a change was made to the command-line text
329+
|CmdlineEnter| after the cursor moves to the command line
330+
|CmdlineLeave| before the cursor leaves the command line
331+
332+
|CmdlineChanged| after a change was made to the command-line text
333+
|CmdlineEnter| after the cursor moves to the command line
334+
|CmdlineLeave| before the cursor leaves the command line
335+
327336
|InsertEnter| starting Insert mode
328337
|InsertChange| when typing <Insert> while in Insert or Replace mode
329338
|InsertLeave| when leaving Insert mode
@@ -506,9 +515,9 @@ CmdUndefined When a user command is used but it isn't
506515
always define the user command and have it
507516
invoke an autoloaded function. See |autoload|.
508517
*CmdlineChanged*
509-
CmdlineChanged After a change was made to the text inside
510-
command line. Be careful not to mess up the
511-
command line, it may cause Vim to lock up.
518+
CmdlineChanged After a change was made to the text in the
519+
command line. Be careful not to mess up
520+
the command line, it may cause Vim to lock up.
512521
<afile> is set to a single character,
513522
indicating the type of command-line.
514523
|cmdwin-char|
@@ -648,6 +657,11 @@ DirChanged The working directory has changed in response
648657
"auto" to trigger on 'autochdir'.
649658
"drop" to trigger on editing a file
650659
<afile> is set to the new directory name.
660+
*ExitPre*
661+
ExitPre When using `:quit`, `:wq` in a way it makes
662+
Vim exit, or using `:qall`, just after
663+
|QuitPre|. Can be used to close any
664+
non-essential window.
651665
*FileChangedShell*
652666
FileChangedShell When Vim notices that the modification time of
653667
a file has changed since editing started.
@@ -785,7 +799,7 @@ InsertCharPre When a character is typed in Insert mode,
785799
inserted literally.
786800
It is not allowed to change the text |textlock|.
787801
The event is not triggered when 'paste' is
788-
set.
802+
set. {only with the +eval feature}
789803
*InsertEnter*
790804
InsertEnter Just before starting Insert mode. Also for
791805
Replace mode and Virtual Replace mode. The
@@ -863,6 +877,7 @@ QuitPre When using `:quit`, `:wq` or `:qall`, before
863877
or quits Vim. Can be used to close any
864878
non-essential window if the current window is
865879
the last ordinary window.
880+
Also see |ExitPre|.
866881
*RemoteReply*
867882
RemoteReply When a reply from a Vim that functions as
868883
server was received |server2client()|. The
@@ -931,6 +946,7 @@ SwapExists Detected an existing swap file when starting
931946
It is not allowed to change to another buffer,
932947
change a buffer name or change directory
933948
here.
949+
{only available with the +eval feature}
934950
*Syntax*
935951
Syntax When the 'syntax' option has been set. The
936952
pattern is matched against the syntax name.
@@ -957,6 +973,11 @@ TermChanged After the value of 'term' has changed. Useful
957973
for re-loading the syntax file to update the
958974
colors, fonts and other terminal-dependent
959975
settings. Executed for all loaded buffers.
976+
*TerminalOpen*
977+
TerminalOpen Just after a terminal buffer was created, with
978+
`:terminal` or |term_start()|. This event is
979+
triggered even if the buffer is created
980+
without a window, with the ++hidden option.
960981
*TermResponse*
961982
TermResponse After the response to |t_RV| is received from
962983
the terminal. The value of |v:termresponse|
@@ -1003,6 +1024,7 @@ TextYankPost After text has been yanked or deleted in the
10031024
called recursively.
10041025
It is not allowed to change the buffer text,
10051026
see |textlock|.
1027+
{only when compiled with the +eval feature}
10061028
*User*
10071029
User Never executed automatically. To be used for
10081030
autocommands that are only executed with

runtime/doc/eval.txt

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 8.0. Last change: 2018 Feb 27
1+
*eval.txt* For Vim version 8.0. Last change: 2018 Mar 10
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2435,6 +2435,8 @@ term_gettty({buf}, [{input}]) String get the tty name of a terminal
24352435
term_list() List get the list of terminal buffers
24362436
term_scrape({buf}, {row}) List get row of a terminal screen
24372437
term_sendkeys({buf}, {keys}) none send keystrokes to a terminal
2438+
term_setkill({buf}, {how}) none set signal to stop job in terminal
2439+
term_setrestore({buf}, {command}) none set command to restore terminal
24382440
term_start({cmd}, {options}) Job open a terminal window and run a job
24392441
term_wait({buf} [, {time}]) Number wait for screen to be updated
24402442
test_alloc_fail({id}, {countdown}, {repeat})
@@ -4885,7 +4887,19 @@ getwinpos([{timeout}]) *getwinpos()*
48854887
[x-pos, y-pos]
48864888
{timeout} can be used to specify how long to wait in msec for
48874889
a response from the terminal. When omitted 100 msec is used.
4888-
4890+
Use a longer time for a remote terminal.
4891+
When using a value less than 10 and no response is received
4892+
within that time, a previously reported position is returned,
4893+
if available. This can be used to poll for the position and
4894+
do some work in the mean time: >
4895+
while 1
4896+
let res = getwinpos(1)
4897+
if res[0] >= 0
4898+
break
4899+
endif
4900+
" Do some work here
4901+
endwhile
4902+
<
48894903
*getwinposx()*
48904904
getwinposx() The result is a Number, which is the X coordinate in pixels of
48914905
the left hand side of the GUI Vim window. Also works for an
@@ -8263,6 +8277,8 @@ term_getline({buf}, {row}) *term_getline()*
82638277
The first line has {row} one. When {row} is "." the cursor
82648278
line is used. When {row} is invalid an empty string is
82658279
returned.
8280+
8281+
To get attributes of each character use |term_scrape()|.
82668282
{only available when compiled with the |+terminal| feature}
82678283

82688284
term_getscrolled({buf}) *term_getscrolled()*
@@ -8348,6 +8364,28 @@ term_sendkeys({buf}, {keys}) *term_sendkeys()*
83488364
means the character CTRL-X.
83498365
{only available when compiled with the |+terminal| feature}
83508366

8367+
term_setkill({buf}, {how}) *term_setkill()*
8368+
When exiting Vim or trying to close the terminal window in
8369+
another way, {how} defines whether the job in the terminal can
8370+
be stopped.
8371+
When {how} is empty (the default), the job will not be
8372+
stopped, trying to exit will result in |E947|.
8373+
Otherwise, {how} specifies what signal to send to the job.
8374+
See |job_stop()| for the values.
8375+
8376+
After sending the signal Vim will wait for up to a second to
8377+
check that the job actually stopped.
8378+
8379+
term_setrestore({buf}, {command}) *term_setrestore()*
8380+
Set the command to write in a session file to restore the job
8381+
in this terminal. The line written in the session file is: >
8382+
terminal ++curwin ++cols=%d ++rows=%d {command}
8383+
< Make sure to escape the command properly.
8384+
8385+
Use an empty {command} to run 'shell'.
8386+
Use "NONE" to not restore this window.
8387+
{only available when compiled with the |+terminal| feature}
8388+
83518389
term_setsize({buf}, {expr}) *term_setsize()*
83528390
Not implemented yet.
83538391
{only available when compiled with the |+terminal| feature}
@@ -8391,6 +8429,10 @@ term_start({cmd}, {options}) *term_start()*
83918429
window; fails if the current buffer
83928430
cannot be |abandon|ed
83938431
"hidden" do not open a window
8432+
"norestore" do not add the terminal window to a
8433+
session file
8434+
"term_kill" what to do when trying to close the
8435+
terminal window, see |term_setkill()|
83948436
"term_finish" What to do when the job is finished:
83958437
"close": close any windows
83968438
"open": open window if needed

runtime/doc/gui.txt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*gui.txt* For Vim version 8.0. Last change: 2017 Nov 09
1+
*gui.txt* For Vim version 8.0. Last change: 2018 Mar 06
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -134,7 +134,7 @@ task bar with the 'guiheadroom' option.
134134
:winp[os]
135135
Display current position of the top left corner of the GUI vim
136136
window in pixels. Does not work in all versions.
137-
Also see |getwinposx()| and |getwinposy()|.
137+
Also see |getwinpos()|, |getwinposx()| and |getwinposy()|.
138138

139139
:winp[os] {X} {Y} *E466*
140140
Put the GUI vim window at the given {X} and {Y} coordinates.
@@ -993,10 +993,15 @@ it behaves in a strange way.
993993
:popu[p] {name} Popup the menu {name}. The menu named must
994994
have at least one subentry, but need not
995995
appear on the menu-bar (see |hidden-menus|).
996-
{only available for Win32, MacVim, and GTK GUI}
996+
{only available for Win32, MacVim, and GTK GUI
997+
or in the terminal when compiled with
998+
+insert_expand}
997999

9981000
:popu[p]! {name} Like above, but use the position of the mouse
9991001
pointer instead of the cursor.
1002+
In the terminal this is the last known
1003+
position, which is usually at the last click
1004+
or release (mouse movement is irrelevalt).
10001005

10011006
Example: >
10021007
:popup File
@@ -1007,6 +1012,10 @@ pointer if ! was used). >
10071012
:popup ]Toolbar
10081013
This creates a popup menu that doesn't exist on the main menu-bar.
10091014

1015+
Note that in the GUI the :popup command will return immediately, before a
1016+
selection has been made. In the terminal the commands waits for the user to
1017+
make a selection.
1018+
10101019
Note that a menu that starts with ']' will not be displayed.
10111020

10121021
==============================================================================

runtime/doc/options.txt

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*options.txt* For Vim version 8.0. Last change: 2018 Feb 25
1+
*options.txt* For Vim version 8.0. Last change: 2018 Mar 09
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -402,8 +402,8 @@ Setting the filetype
402402
used to set the option value in, unless this is a help
403403
window, in which case the window below help window is
404404
used (skipping the option-window).
405-
{not available when compiled without the |+eval| or
406-
|+autocmd| features}
405+
{not available when compiled without the |+eval|
406+
feature}
407407

408408
*$HOME*
409409
Using "~" is like using "$HOME", but it is only recognized at the start of an
@@ -1398,8 +1398,7 @@ A jump table for the options with a short description can be found at |Q_op|.
13981398
written
13991399
nowrite buffer which will not be written
14001400
acwrite buffer which will always be written with BufWriteCmd
1401-
autocommands. {not available when compiled without the
1402-
|+autocmd| feature}
1401+
autocommands.
14031402
quickfix quickfix buffer, contains list of errors |:cwindow|
14041403
or list of locations |:lwindow|
14051404
help help buffer (you are not supposed to set this
@@ -2489,8 +2488,6 @@ A jump table for the options with a short description can be found at |Q_op|.
24892488
'cursorbind' 'crb' boolean (default off)
24902489
local to window
24912490
{not in Vi}
2492-
{not available when compiled without the |+cursorbind|
2493-
feature}
24942491
When this option is set, as the cursor in the current
24952492
window moves other cursorbound windows (windows that also have
24962493
this option set) move their cursors to the corresponding line and
@@ -2941,8 +2938,6 @@ A jump table for the options with a short description can be found at |Q_op|.
29412938
'eventignore' 'ei' string (default "")
29422939
global
29432940
{not in Vi}
2944-
{not available when compiled without the |+autocmd|
2945-
feature}
29462941
A list of autocommand event names, which are to be ignored.
29472942
When set to "all" or when "all" is one of the items, all autocommand
29482943
events are ignored, autocommands will not be executed.
@@ -3191,8 +3186,6 @@ A jump table for the options with a short description can be found at |Q_op|.
31913186
'filetype' 'ft' string (default: "")
31923187
local to buffer
31933188
{not in Vi}
3194-
{not available when compiled without the |+autocmd|
3195-
feature}
31963189
When this option is set, the FileType autocommand event is triggered.
31973190
All autocommands that match with the value of this option will be
31983191
executed. Thus the value of 'filetype' is used in place of the file
@@ -5495,6 +5488,8 @@ A jump table for the options with a short description can be found at |Q_op|.
54955488
an explanation.
54965489
When 'buftype' is "nowrite" or "nofile" this option may be set, but
54975490
will be ignored.
5491+
Note that the text may actually be the same, e.g. 'modified' is set
5492+
when using "rA" on an "A".
54985493

54995494
*'more'* *'nomore'*
55005495
'more' boolean (Vim default: on, Vi default: off)
@@ -5583,6 +5578,8 @@ A jump table for the options with a short description can be found at |Q_op|.
55835578

55845579
In the "popup" model the right mouse button produces a pop-up menu.
55855580
You need to define this first, see |popup-menu|.
5581+
In a terminal the popup menu works if Vim is compiled with the
5582+
|+insert_expand| option.
55865583

55875584
Note that you can further refine the meaning of buttons with mappings.
55885585
See |gui-mouse-mapping|. But mappings are NOT used for modeless
@@ -6602,6 +6599,8 @@ A jump table for the options with a short description can be found at |Q_op|.
66026599
to find files which replace a distributed runtime files. You can put
66036600
a directory after $VIMRUNTIME to find files which add to distributed
66046601
runtime files.
6602+
When Vim is started with |--clean| the home directory entries are not
6603+
included.
66056604
This option cannot be set from a |modeline| or in the |sandbox|, for
66066605
security reasons.
66076606

@@ -6620,8 +6619,6 @@ A jump table for the options with a short description can be found at |Q_op|.
66206619
'scrollbind' 'scb' boolean (default off)
66216620
local to window
66226621
{not in Vi}
6623-
{not available when compiled without the |+scrollbind|
6624-
feature}
66256622
See also |scroll-binding|. When this option is set, the current
66266623
window scrolls as other scrollbind windows (windows that also have
66276624
this option set) scroll. This option is useful for viewing the
@@ -6659,8 +6656,6 @@ A jump table for the options with a short description can be found at |Q_op|.
66596656
*'scrollopt'* *'sbo'*
66606657
'scrollopt' 'sbo' string (default "ver,jump")
66616658
global
6662-
{not available when compiled without the |+scrollbind|
6663-
feature}
66646659
{not in Vi}
66656660
This is a comma-separated list of words that specifies how
66666661
'scrollbind' windows should behave. 'sbo' stands for ScrollBind
@@ -6750,7 +6745,7 @@ A jump table for the options with a short description can be found at |Q_op|.
67506745

67516746
*'sessionoptions'* *'ssop'*
67526747
'sessionoptions' 'ssop' string (default: "blank,buffers,curdir,folds,
6753-
help,options,tabpages,winsize")
6748+
help,options,tabpages,winsize,terminal")
67546749
global
67556750
{not in Vi}
67566751
{not available when compiled without the |+mksession|
@@ -6782,6 +6777,7 @@ A jump table for the options with a short description can be found at |Q_op|.
67826777
tabpages all tab pages; without this only the current tab page
67836778
is restored, so that you can make a session for each
67846779
tab page separately
6780+
terminal include terminal windows where the command can be restored
67856781
unix with Unix end-of-line format (single <NL>), even when
67866782
on Windows or DOS
67876783
winpos position of the whole Vim window
@@ -7577,7 +7573,6 @@ A jump table for the options with a short description can be found at |Q_op|.
75777573
W F Preview window flag, text is ",PRV".
75787574
y F Type of file in the buffer, e.g., "[vim]". See 'filetype'.
75797575
Y F Type of file in the buffer, e.g., ",VIM". See 'filetype'.
7580-
{not available when compiled without |+autocmd| feature}
75817576
q S "[Quickfix List]", "[Location List]" or empty.
75827577
k S Value of "b:keymap_name" or 'keymap' when |:lmap| mappings are
75837578
being used: "<keymap>"

0 commit comments

Comments
 (0)