Skip to content

Commit b111b79

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 27bdb64 + e2c8d83 commit b111b79

68 files changed

Lines changed: 3494 additions & 2362 deletions

Some content is hidden

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

runtime/colors/README.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,16 @@ this autocmd might be useful:
4242
Replace "blue_sky" with the name of the colorscheme.
4343

4444
In case you want to tweak a colorscheme after it was loaded, check out the
45-
ColorScheme autocmd event.
45+
ColorScheme autocommand event.
46+
47+
To clean up just before loading another colorscheme, use the ColorSchemePre
48+
autocommand event. For example:
49+
let g:term_ansi_colors = ...
50+
augroup MyColorscheme
51+
au!
52+
au ColorSchemePre * unlet g:term_ansi_colors
53+
au ColorSchemePre * au! MyColorscheme
54+
augroup END
4655

4756
To customize a colorscheme use another name, e.g. "~/.vim/colors/mine.vim",
4857
and use `:runtime` to load the original colorscheme:

runtime/doc/autocmd.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*autocmd.txt* For Vim version 8.0. Last change: 2018 Apr 19
1+
*autocmd.txt* For Vim version 8.0. Last change: 2018 Apr 30
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -347,6 +347,7 @@ Name triggered by ~
347347
when popup menu visible
348348
|TextYankPost| after text is yanked or deleted
349349

350+
|ColorSchemePre| before loading a color scheme
350351
|ColorScheme| after loading a color scheme
351352

352353
|RemoteReply| a reply from a server Vim was received
@@ -562,6 +563,10 @@ ColorScheme After loading a color scheme. |:colorscheme|
562563
set, and <amatch> for the new colorscheme
563564
name.
564565

566+
*ColorSchemePre*
567+
ColorSchemePre Before loading a color scheme. |:colorscheme|
568+
Useful to setup removing things added by a
569+
color scheme, before another one is loaded.
565570

566571
*CompleteDone*
567572
CompleteDone After Insert mode completion is done. Either

runtime/doc/cmdline.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,14 @@ CTRL-R CTRL-F *c_CTRL-R_CTRL-F* *c_<C-R>_<C-F>*
175175
CTRL-R CTRL-P *c_CTRL-R_CTRL-P* *c_<C-R>_<C-P>*
176176
CTRL-R CTRL-W *c_CTRL-R_CTRL-W* *c_<C-R>_<C-W>*
177177
CTRL-R CTRL-A *c_CTRL-R_CTRL-A* *c_<C-R>_<C-A>*
178+
CTRL-R CTRL-L *c_CTRL-R_CTRL-L* *c_<C-R>_<C-L>*
178179
Insert the object under the cursor:
179180
CTRL-F the Filename under the cursor
180181
CTRL-P the Filename under the cursor, expanded with
181182
'path' as in |gf|
182183
CTRL-W the Word under the cursor
183184
CTRL-A the WORD under the cursor; see |WORD|
185+
CTRL-L the line under the cursor
184186

185187
When 'incsearch' is set the cursor position at the end of the
186188
currently displayed match is used. With CTRL-W the part of
@@ -192,8 +194,8 @@ CTRL-R CTRL-A *c_CTRL-R_CTRL-A* *c_<C-R>_<C-A>*
192194

193195
*c_CTRL-R_CTRL-R* *c_<C-R>_<C-R>*
194196
*c_CTRL-R_CTRL-O* *c_<C-R>_<C-O>*
195-
CTRL-R CTRL-R {0-9a-z"%#:-=. CTRL-F CTRL-P CTRL-W CTRL-A}
196-
CTRL-R CTRL-O {0-9a-z"%#:-=. CTRL-F CTRL-P CTRL-W CTRL-A}
197+
CTRL-R CTRL-R {0-9a-z"%#:-=. CTRL-F CTRL-P CTRL-W CTRL-A CTRL-L}
198+
CTRL-R CTRL-O {0-9a-z"%#:-=. CTRL-F CTRL-P CTRL-W CTRL-A CTRL-L}
197199
Insert register or object under the cursor. Works like
198200
|c_CTRL-R| but inserts the text literally. For example, if
199201
register a contains "xy^Hz" (where ^H is a backspace),

runtime/doc/develop.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*develop.txt* For Vim version 8.0. Last change: 2018 Apr 18
1+
*develop.txt* For Vim version 8.0. Last change: 2018 Apr 23
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -182,7 +182,7 @@ The basic steps to make changes to the code:
182182
include the diff. Or create a pull request on github.
183183

184184

185-
C COMPILER *style-compiler*
185+
C COMPILER *style-compiler* *ANSI-C* *C89* *C99*
186186

187187
The minimal C compiler version supported is C89, also known as ANSI C.
188188
Later standards, such as C99, are not widely supported, or at least not 100%

runtime/doc/eval.txt

Lines changed: 49 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 8.0. Last change: 2018 Apr 20
1+
*eval.txt* For Vim version 8.0. Last change: 2018 Apr 28
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1548,10 +1548,12 @@ v:errmsg Last given error message. It's allowed to set this variable.
15481548
: ... handle error
15491549
< "errmsg" also works, for backwards compatibility.
15501550

1551-
*v:errors* *errors-variable*
1551+
*v:errors* *errors-variable* *assert-return*
15521552
v:errors Errors found by assert functions, such as |assert_true()|.
15531553
This is a list of strings.
15541554
The assert functions append an item when an assert fails.
1555+
The return value indicates this: a one is returned if an item
1556+
was added to v:errors, otherwise zero is returned.
15551557
To remove old results make it empty: >
15561558
:let v:errors = []
15571559
< If v:errors is set to anything but a list it is made an empty
@@ -2020,26 +2022,26 @@ argidx() Number current index in the argument list
20202022
arglistid([{winnr} [, {tabnr}]]) Number argument list id
20212023
argv({nr}) String {nr} entry of the argument list
20222024
argv() List the argument list
2023-
assert_beeps({cmd}) none assert {cmd} causes a beep
2025+
assert_beeps({cmd}) Number assert {cmd} causes a beep
20242026
assert_equal({exp}, {act} [, {msg}])
2025-
none assert {exp} is equal to {act}
2027+
Number assert {exp} is equal to {act}
20262028
assert_equalfile({fname-one}, {fname-two})
2027-
none assert file contents is equal
2029+
Number assert file contents is equal
20282030
assert_exception({error} [, {msg}])
2029-
none assert {error} is in v:exception
2030-
assert_fails({cmd} [, {error}]) none assert {cmd} fails
2031+
Number assert {error} is in v:exception
2032+
assert_fails({cmd} [, {error}]) Number assert {cmd} fails
20312033
assert_false({actual} [, {msg}])
2032-
none assert {actual} is false
2034+
Number assert {actual} is false
20332035
assert_inrange({lower}, {upper}, {actual} [, {msg}])
2034-
none assert {actual} is inside the range
2036+
Number assert {actual} is inside the range
20352037
assert_match({pat}, {text} [, {msg}])
2036-
none assert {pat} matches {text}
2038+
Number assert {pat} matches {text}
20372039
assert_notequal({exp}, {act} [, {msg}])
2038-
none assert {exp} is not equal {act}
2040+
Number assert {exp} is not equal {act}
20392041
assert_notmatch({pat}, {text} [, {msg}])
2040-
none assert {pat} not matches {text}
2041-
assert_report({msg}) none report a test failure
2042-
assert_true({actual} [, {msg}]) none assert {actual} is true
2042+
Number assert {pat} not matches {text}
2043+
assert_report({msg}) Number report a test failure
2044+
assert_true({actual} [, {msg}]) Number assert {actual} is true
20432045
asin({expr}) Float arc sine of {expr}
20442046
atan({expr}) Float arc tangent of {expr}
20452047
atan2({expr1}, {expr2}) Float arc tangent of {expr1} / {expr2}
@@ -2593,12 +2595,13 @@ argv([{nr}]) The result is the {nr}th file in the argument list of the
25932595
assert_beeps({cmd}) *assert_beeps()*
25942596
Run {cmd} and add an error message to |v:errors| if it does
25952597
NOT produce a beep or visual bell.
2596-
Also see |assert_fails()|.
2598+
Also see |assert_fails()| and |assert-return|.
25972599

25982600
*assert_equal()*
25992601
assert_equal({expected}, {actual} [, {msg}])
26002602
When {expected} and {actual} are not equal an error message is
2601-
added to |v:errors|.
2603+
added to |v:errors| and 1 is returned. Otherwise zero is
2604+
returned |assert-return|.
26022605
There is no automatic conversion, the String "4" is different
26032606
from the Number 4. And the number 4 is different from the
26042607
Float 4.0. The value of 'ignorecase' is not used here, case
@@ -2614,13 +2617,14 @@ assert_equal({expected}, {actual} [, {msg}])
26142617
assert_equalfile({fname-one}, {fname-two})
26152618
When the files {fname-one} and {fname-two} do not contain
26162619
exactly the same text an error message is added to |v:errors|.
2620+
Also see |assert-return|.
26172621
When {fname-one} or {fname-two} does not exist the error will
26182622
mention that.
26192623
Mainly useful with |terminal-diff|.
26202624

26212625
assert_exception({error} [, {msg}]) *assert_exception()*
26222626
When v:exception does not contain the string {error} an error
2623-
message is added to |v:errors|.
2627+
message is added to |v:errors|. Also see |assert-return|.
26242628
This can be used to assert that a command throws an exception.
26252629
Using the error number, followed by a colon, avoids problems
26262630
with translations: >
@@ -2633,14 +2637,15 @@ assert_exception({error} [, {msg}]) *assert_exception()*
26332637
26342638
assert_fails({cmd} [, {error}]) *assert_fails()*
26352639
Run {cmd} and add an error message to |v:errors| if it does
2636-
NOT produce an error.
2640+
NOT produce an error. Also see |assert-return|.
26372641
When {error} is given it must match in |v:errmsg|.
26382642
Note that beeping is not considered an error, and some failing
26392643
commands only beep. Use |assert_beeps()| for those.
26402644

26412645
assert_false({actual} [, {msg}]) *assert_false()*
26422646
When {actual} is not false an error message is added to
2643-
|v:errors|, like with |assert_equal()|.
2647+
|v:errors|, like with |assert_equal()|.
2648+
Also see |assert-return|.
26442649
A value is false when it is zero. When {actual} is not a
26452650
number the assert fails.
26462651
When {msg} is omitted an error in the form
@@ -2649,15 +2654,15 @@ assert_false({actual} [, {msg}]) *assert_false()*
26492654
assert_inrange({lower}, {upper}, {actual} [, {msg}]) *assert_inrange()*
26502655
This asserts number values. When {actual} is lower than
26512656
{lower} or higher than {upper} an error message is added to
2652-
|v:errors|.
2657+
|v:errors|. Also see |assert-return|.
26532658
When {msg} is omitted an error in the form
26542659
"Expected range {lower} - {upper}, but got {actual}" is
26552660
produced.
26562661

26572662
*assert_match()*
26582663
assert_match({pattern}, {actual} [, {msg}])
26592664
When {pattern} does not match {actual} an error message is
2660-
added to |v:errors|.
2665+
added to |v:errors|. Also see |assert-return|.
26612666

26622667
{pattern} is used as with |=~|: The matching is always done
26632668
like 'magic' was set and 'cpoptions' is empty, no matter what
@@ -2678,18 +2683,22 @@ assert_match({pattern}, {actual} [, {msg}])
26782683
assert_notequal({expected}, {actual} [, {msg}])
26792684
The opposite of `assert_equal()`: add an error message to
26802685
|v:errors| when {expected} and {actual} are equal.
2686+
Also see |assert-return|.
26812687

26822688
*assert_notmatch()*
26832689
assert_notmatch({pattern}, {actual} [, {msg}])
26842690
The opposite of `assert_match()`: add an error message to
26852691
|v:errors| when {pattern} matches {actual}.
2692+
Also see |assert-return|.
26862693

26872694
assert_report({msg}) *assert_report()*
26882695
Report a test failure directly, using {msg}.
2696+
Always returns one.
26892697

26902698
assert_true({actual} [, {msg}]) *assert_true()*
26912699
When {actual} is not true an error message is added to
26922700
|v:errors|, like with |assert_equal()|.
2701+
Also see |assert-return|.
26932702
A value is TRUE when it is a non-zero number. When {actual}
26942703
is not a number the assert fails.
26952704
When {msg} is omitted an error in the form "Expected True but
@@ -4728,6 +4737,7 @@ getqflist([{what}]) *getqflist()*
47284737
list item is a dictionary with these entries:
47294738
bufnr number of buffer that has the file name, use
47304739
bufname() to get the name
4740+
module module name
47314741
lnum line number in the buffer (first line is 1)
47324742
col column number (first column is 1)
47334743
vcol |TRUE|: "col" is visual column
@@ -4753,8 +4763,8 @@ getqflist([{what}]) *getqflist()*
47534763
returns only the items listed in {what} as a dictionary. The
47544764
following string items are supported in {what}:
47554765
changedtick get the total number of changes made
4756-
to the list
4757-
context get the context stored with |setqflist()|
4766+
to the list |quickfix-changedtick|
4767+
context get the |quickfix-context|
47584768
efm errorformat to use when parsing "lines". If
47594769
not present, then the 'errorformat' option
47604770
value is used.
@@ -4763,15 +4773,15 @@ getqflist([{what}]) *getqflist()*
47634773
current list or the list specified by "nr"
47644774
idx index of the current entry in the list
47654775
items quickfix list entries
4766-
lines use 'errorformat' to extract items from a list
4767-
of lines and return the resulting entries.
4768-
Only a |List| type is accepted. The current
4769-
quickfix list is not modified.
4776+
lines parse a list of lines using 'efm' and return
4777+
the resulting entries. Only a |List| type is
4778+
accepted. The current quickfix list is not
4779+
modified. See |quickfix-parse|.
47704780
nr get information for this quickfix list; zero
47714781
means the current quickfix list and "$" means
47724782
the last quickfix list
47734783
size number of entries in the quickfix list
4774-
title get the list title
4784+
title get the list title |quickfix-title|
47754785
winid get the quickfix |window-ID|
47764786
all all of the above quickfix properties
47774787
Non-string items in {what} are ignored. To get the value of a
@@ -4789,7 +4799,7 @@ getqflist([{what}]) *getqflist()*
47894799
The returned dictionary contains the following entries:
47904800
changedtick total number of changes made to the
47914801
list |quickfix-changedtick|
4792-
context context information stored with |setqflist()|.
4802+
context quickfix list context. See |quickfix-context|
47934803
If not present, set to "".
47944804
id quickfix list ID |quickfix-ID|. If not
47954805
present, set to 0.
@@ -4804,12 +4814,11 @@ getqflist([{what}]) *getqflist()*
48044814
to "".
48054815
winid quickfix |window-ID|. If not present, set to 0
48064816

4807-
Examples: >
4817+
Examples (See also |getqflist-examples|): >
48084818
:echo getqflist({'all': 1})
48094819
:echo getqflist({'nr': 2, 'title': 1})
48104820
:echo getqflist({'lines' : ["F1:10:L10"]})
48114821
<
4812-
48134822
getreg([{regname} [, 1 [, {list}]]]) *getreg()*
48144823
The result is a String, which is the contents of register
48154824
{regname}. Example: >
@@ -5392,17 +5401,20 @@ job_getchannel({job}) *job_getchannel()*
53925401
<
53935402
{only available when compiled with the |+job| feature}
53945403

5395-
job_info({job}) *job_info()*
5404+
job_info([{job}]) *job_info()*
53965405
Returns a Dictionary with information about {job}:
53975406
"status" what |job_status()| returns
53985407
"channel" what |job_getchannel()| returns
5408+
"cmd" List of command arguments used to start the job
53995409
"process" process ID
54005410
"tty_in" terminal input name, empty when none
54015411
"tty_out" terminal output name, empty when none
54025412
"exitval" only valid when "status" is "dead"
54035413
"exit_cb" function to be called on exit
54045414
"stoponexit" |job-stoponexit|
54055415

5416+
Without any arguments, returns a List with all Job objects.
5417+
54065418
job_setoptions({job}, {options}) *job_setoptions()*
54075419
Change options for {job}. Supported are:
54085420
"stoponexit" |job-stoponexit|
@@ -7210,6 +7222,8 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()*
72107222
buffer
72117223
filename name of a file; only used when "bufnr" is not
72127224
present or it is invalid.
7225+
module name of a module; if given it will be used in
7226+
quickfix error window instead of the filename.
72137227
lnum line number in the file
72147228
pattern search pattern used to locate the error
72157229
col column number
@@ -7258,7 +7272,7 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()*
72587272
only the items listed in {what} are set. The first {list}
72597273
argument is ignored. The following items can be specified in
72607274
{what}:
7261-
context any Vim type can be stored as a context
7275+
context quickfix list context. See |quickfix-context|
72627276
efm errorformat to use when parsing text from
72637277
"lines". If this is not present, then the
72647278
'errorformat' option value is used.
@@ -7280,10 +7294,10 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()*
72807294
list is modified, "id" should be used instead of "nr" to
72817295
specify the list.
72827296

7283-
Examples: >
7297+
Examples (See also |setqflist-examples|): >
72847298
:call setqflist([], 'r', {'title': 'My search'})
72857299
:call setqflist([], 'r', {'nr': 2, 'title': 'Errors'})
7286-
:call setqflist([], 'a', {'id':myid, 'lines':["F1:10:L10"]})
7300+
:call setqflist([], 'a', {'id':qfid, 'lines':["F1:10:L10"]})
72877301
<
72887302
Returns zero for success, -1 for failure.
72897303

runtime/doc/options.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*options.txt* For Vim version 8.0. Last change: 2018 Apr 21
1+
*options.txt* For Vim version 8.0. Last change: 2018 Apr 22
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2140,7 +2140,7 @@ A jump table for the options with a short description can be found at |Q_op|.
21402140
*cpo-E*
21412141
E It is an error when using "y", "d", "c", "g~", "gu" or
21422142
"gU" on an Empty region. The operators only work when
2143-
at least one character is to be operate on. Example:
2143+
at least one character is to be operated on. Example:
21442144
This makes "y0" fail in the first column.
21452145
*cpo-f*
21462146
f When included, a ":read" command with a file name
@@ -6245,7 +6245,7 @@ A jump table for the options with a short description can be found at |Q_op|.
62456245
{only available when compiled with the |+reltime|
62466246
feature}
62476247
The time in milliseconds for redrawing the display. This applies to
6248-
searching for patterns for 'hlsearch', |:match| highlighting an syntax
6248+
searching for patterns for 'hlsearch', |:match| highlighting and syntax
62496249
highlighting.
62506250
When redrawing takes more than this many milliseconds no further
62516251
matches will be highlighted.

0 commit comments

Comments
 (0)