Skip to content

Commit 74283d8

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 578547c + d1caa94 commit 74283d8

Some content is hidden

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

83 files changed

+1164
-546
lines changed

runtime/autoload/ccomplete.vim

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim completion script
22
" Language: C
33
" Maintainer: Bram Moolenaar <[email protected]>
4-
" Last Change: 2018 Aug 20
4+
" Last Change: 2020 Apr 08
55

66
let s:cpo_save = &cpo
77
set cpo&vim
@@ -635,3 +635,5 @@ endfunc
635635

636636
let &cpo = s:cpo_save
637637
unlet s:cpo_save
638+
639+
" vim: noet sw=2 sts=2

runtime/autoload/dist/ft.vim

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim functions for file type detection
22
"
33
" Maintainer: Bram Moolenaar <[email protected]>
4-
" Last Change: 2020 Jan 02
4+
" Last Change: 2020 Mar 30
55

66
" These functions are moved here from runtime/filetype.vim to make startup
77
" faster.
@@ -325,7 +325,7 @@ endfunc
325325

326326
func dist#ft#FTmm()
327327
let n = 1
328-
while n < 10
328+
while n < 20
329329
let line = getline(n)
330330
if line =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|/\*\)'
331331
setf objcpp

runtime/doc/change.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1458,7 +1458,7 @@ text. Put it in your autoload directory, e.g. ~/.vim/autoload/format.vim: >
14581458
func! format#Format()
14591459
" only reformat on explicit gq command
14601460
if mode() != 'n'
1461-
" fall back to Vims internal reformatting
1461+
" fall back to Vim's internal reformatting
14621462
return 1
14631463
endif
14641464
let lines = getline(v:lnum, v:lnum + v:count - 1)

runtime/doc/eval.txt

+16-19
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 8.2. Last change: 2020 Mar 26
1+
*eval.txt* For Vim version 8.2. Last change: 2020 Apr 08
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -5149,10 +5149,11 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
51495149
<
51505150
*getcurpos()*
51515151
getcurpos() Get the position of the cursor. This is like getpos('.'), but
5152-
includes an extra item in the list:
5153-
[bufnum, lnum, col, off, curswant] ~
5152+
includes an extra "curswant" item in the list:
5153+
[0, lnum, col, off, curswant] ~
51545154
The "curswant" number is the preferred column when moving the
51555155
cursor vertically. Also see |getpos()|.
5156+
The first "bufnum" item is always zero.
51565157

51575158
This can be used to save and restore the cursor position: >
51585159
let save_cursor = getcurpos()
@@ -8929,18 +8930,10 @@ settagstack({nr}, {dict} [, {action}]) *settagstack()*
89298930

89308931
Returns zero for success, -1 for failure.
89318932

8932-
Examples:
8933-
Set current index of the tag stack to 4: >
8934-
call settagstack(1005, {'curidx' : 4})
8935-
8936-
< Empty the tag stack of window 3: >
8933+
Examples (for more examples see |tagstack-examples||):
8934+
Empty the tag stack of window 3: >
89378935
call settagstack(3, {'items' : []})
89388936
8939-
< Push a new item onto the tag stack: >
8940-
let pos = [bufnr('myfile.txt'), 10, 1, 0]
8941-
let newtag = [{'tagname' : 'mytag', 'from' : pos}]
8942-
call settagstack(2, {'items' : newtag}, 'a')
8943-
89448937
< Save and restore the tag stack: >
89458938
let stack = gettagstack(1003)
89468939
" do something else
@@ -9036,6 +9029,8 @@ simplify({filename}) *simplify()*
90369029
directory. In order to resolve all the involved symbolic
90379030
links before simplifying the path name, use |resolve()|.
90389031

9032+
Can also be used as a |method|: >
9033+
GetName()->simplify()
90399034
90409035
sin({expr}) *sin()*
90419036
Return the sine of {expr}, measured in radians, as a |Float|.
@@ -10888,6 +10883,7 @@ hpux HP-UX version of Vim.
1088810883
iconv Can use iconv() for conversion.
1088910884
insert_expand Compiled with support for CTRL-X expansion commands in
1089010885
Insert mode. (always true)
10886+
job Compiled with support for |channel| and |job|
1089110887
jumplist Compiled with |jumplist| support.
1089210888
keymap Compiled with 'keymap' support.
1089310889
lambda Compiled with |lambda| support.
@@ -11255,8 +11251,8 @@ It is allowed to define another function inside a function body.
1125511251
You can provide default values for positional named arguments. This makes
1125611252
them optional for function calls. When a positional argument is not
1125711253
specified at a call, the default expression is used to initialize it.
11258-
This only works for functions declared with `:function`, not for lambda
11259-
expressions |expr-lambda|.
11254+
This only works for functions declared with `:function` or `:def`, not for
11255+
lambda expressions |expr-lambda|.
1126011256

1126111257
Example: >
1126211258
function Something(key, value = 10)
@@ -11294,9 +11290,10 @@ Example that does NOT work: >
1129411290
:function NoGood(first = a:second, second = 10)
1129511291
:endfunction
1129611292
<
11297-
When not using "...", the number of arguments in a function call must be equal
11298-
to the number of mandatory named arguments. When using "...", the number of
11299-
arguments may be larger.
11293+
When not using "...", the number of arguments in a function call must be at
11294+
least equal to the number of mandatory named arguments. When using "...", the
11295+
number of arguments may be larger than the total of mandatory and optional
11296+
arguments.
1130011297

1130111298
*local-variables*
1130211299
Inside a function local variables can be used. These will disappear when the
@@ -11653,7 +11650,7 @@ This does NOT work: >
1165311650
Like above, but append/add/subtract the value for each
1165411651
|List| item.
1165511652

11656-
:let [{name}, ..., ; {lastname}] = {expr1}
11653+
:let [{name}, ..., ; {lastname}] = {expr1} *E452*
1165711654
Like |:let-unpack| above, but the |List| may have more
1165811655
items than there are names. A list of the remaining
1165911656
items is assigned to {lastname}. If there are no

runtime/doc/gui_w32.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ With..." menu. This means you can use Vim to edit many files. Not every file
199199
One reason to add this is to be able to edit HTML files directly from Internet
200200
Explorer. To enable this use the "Tools" menu, "Internet Options..." entry.
201201
In the dialog select the "Programs" tab and select Vim in the "HTML editor"
202-
choice. If it's not there than installing didn't work properly.
202+
choice. If it's not there then installing didn't work properly.
203203

204204
Doing this manually can be done with this script:
205205

runtime/doc/help.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*help.txt* For Vim version 8.2. Last change: 2019 Jul 21
1+
*help.txt* For Vim version 8.2. Last change: 2020 Apr 05
22

33
VIM - main help file
44
k
@@ -31,7 +31,7 @@ Get specific help: It is possible to go directly to whatever you want help
3131
help entries for "word".
3232
Or use ":helpgrep word". |:helpgrep|
3333

34-
Getting started: Do the Vim tutor, a 20 minute interactive training for the
34+
Getting started: Do the Vim tutor, a 30-minute interactive course for the
3535
basic commands, see |vimtutor|.
3636
Read the user manual from start to end: |usr_01.txt|
3737

@@ -41,7 +41,7 @@ through the help of many others. See |credits|.
4141
*doc-file-list* *Q_ct*
4242
BASIC:
4343
|quickref| Overview of the most common commands you will use
44-
|tutor| 20 minutes training course for beginners
44+
|tutor| 30-minute interactive course for beginners
4545
|copying| About copyrights
4646
|iccf| Helping poor children in Uganda
4747
|sponsor| Sponsor Vim development, become a registered Vim user
@@ -144,7 +144,7 @@ Special issues ~
144144
|remote.txt| using Vim as a server or client
145145
|term.txt| using different terminals and mice
146146
|terminal.txt| Terminal window support
147-
|popup.txt| popop window support
147+
|popup.txt| popup window support
148148

149149
Programming language support ~
150150
|indent.txt| automatic indenting for C and other languages

runtime/doc/insert.txt

+8
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ CTRL-R CTRL-R {register} *i_CTRL-R_CTRL-R*
154154
you also want to avoid these, use CTRL-R CTRL-O, see below.
155155
The '.' register (last inserted text) is still inserted as
156156
typed.
157+
After this command, the '.' register contains the text from
158+
the register as if it was inserted by typing it.
157159

158160
CTRL-R CTRL-O {register} *i_CTRL-R_CTRL-O*
159161
Insert the contents of a register literally and don't
@@ -163,13 +165,19 @@ CTRL-R CTRL-O {register} *i_CTRL-R_CTRL-O*
163165
Does not replace characters!
164166
The '.' register (last inserted text) is still inserted as
165167
typed.
168+
After this command, the '.' register contains the command
169+
typed and not the text. I.e., the literals "^R^O" and not the
170+
text from the register.
166171

167172
CTRL-R CTRL-P {register} *i_CTRL-R_CTRL-P*
168173
Insert the contents of a register literally and fix the
169174
indent, like |[<MiddleMouse>|.
170175
Does not replace characters!
171176
The '.' register (last inserted text) is still inserted as
172177
typed.
178+
After this command, the '.' register contains the command
179+
typed and not the text. I.e., the literals "^R^P" and not the
180+
text from the register.
173181

174182
*i_CTRL-T*
175183
CTRL-T Insert one shiftwidth of indent at the start of the current

runtime/doc/options.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*options.txt* For Vim version 8.2. Last change: 2020 Mar 02
1+
*options.txt* For Vim version 8.2. Last change: 2020 Apr 10
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -8107,7 +8107,7 @@ A jump table for the options with a short description can be found at |Q_op|.
81078107
- VIM the server name |v:servername| or "VIM"
81088108
Only works if the terminal supports setting window titles
81098109
(currently Amiga console, Win32 console, all GUI versions and
8110-
terminals with a non- empty 't_ts' option - these are Unix xterm and
8110+
terminals with a non-empty 't_ts' option - these are Unix xterm and
81118111
iris-ansi by default, where 't_ts' is taken from the builtin termcap).
81128112
*X11*
81138113
When Vim was compiled with HAVE_X11 defined, the original title will

runtime/doc/os_beos.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ and merge it back in.
138138

139139
6. The $VIM directory *beos-vimdir*
140140

141-
$VIM is the symbolic name for the place where Vims support files are stored.
141+
$VIM is the symbolic name for the place where Vim's support files are stored.
142142
The default value for $VIM is set at compile time and can be determined with >
143143
144144
:version

runtime/doc/os_haiku.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Stuff that does not work yet:
8888

8989
4. The $VIM directory *haiku-vimdir*
9090

91-
$VIM is the symbolic name for the place where Vims support files are stored.
91+
$VIM is the symbolic name for the place where Vim's support files are stored.
9292
The default value for $VIM is set at compile time and can be determined with >
9393
9494
:version

runtime/doc/tags

+2
Original file line numberDiff line numberDiff line change
@@ -4298,6 +4298,7 @@ E447 editing.txt /*E447*
42984298
E448 various.txt /*E448*
42994299
E449 eval.txt /*E449*
43004300
E45 message.txt /*E45*
4301+
E452 eval.txt /*E452*
43014302
E455 print.txt /*E455*
43024303
E456 print.txt /*E456*
43034304
E457 print.txt /*E457*
@@ -9477,6 +9478,7 @@ tags-file-format tagsrch.txt /*tags-file-format*
94779478
tags-option tagsrch.txt /*tags-option*
94789479
tagsrch.txt tagsrch.txt /*tagsrch.txt*
94799480
tagstack tagsrch.txt /*tagstack*
9481+
tagstack-examples tagsrch.txt /*tagstack-examples*
94809482
tan() eval.txt /*tan()*
94819483
tanh() eval.txt /*tanh()*
94829484
tar pi_tar.txt /*tar*

runtime/doc/tagsrch.txt

+24-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*tagsrch.txt* For Vim version 8.2. Last change: 2020 Jan 30
1+
*tagsrch.txt* For Vim version 8.2. Last change: 2020 Apr 03
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -185,6 +185,29 @@ commands explained above the tag stack will look like this:
185185
The |gettagstack()| function returns the tag stack of a specified window. The
186186
|settagstack()| function modifies the tag stack of a window.
187187

188+
*tagstack-examples*
189+
Write to the tag stack just like `:tag` but with a user-defined
190+
jumper#jump_to_tag function: >
191+
" Store where we're jumping from before we jump.
192+
let tag = expand('<cword>')
193+
let pos = [bufnr()] + getcurpos()[1:]
194+
let item = {'bufnr': pos[0], 'from': pos, 'tagname': tag}
195+
if jumper#jump_to_tag(tag)
196+
" Jump was successful, write previous location to tag stack.
197+
let winid = win_getid()
198+
let stack = gettagstack(winid)
199+
let stack['items'] = [item]
200+
call settagstack(winid, stack, 't')
201+
endif
202+
<
203+
Set current index of the tag stack to 4: >
204+
call settagstack(1005, {'curidx' : 4})
205+
<
206+
Push a new item onto the tag stack: >
207+
let pos = [bufnr('myfile.txt'), 10, 1, 0]
208+
let newtag = [{'tagname' : 'mytag', 'from' : pos}]
209+
call settagstack(2, {'items' : newtag}, 'a')
210+
<
188211
*E73*
189212
When you try to use the tag stack while it doesn't contain anything you will
190213
get an error message.

runtime/doc/terminal.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ Currently supported commands:
960960
directory, thus it's best to use the full path.
961961

962962
[options] is only used when opening a new window. If present,
963-
it must be a Dict. Similarly to |++opt|, These entries are
963+
it must be a Dict. Similarly to |++opt|, these entries are
964964
recognized:
965965
"ff" file format: "dos", "mac" or "unix"
966966
"fileformat" idem

runtime/doc/testing.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*testing.txt* For Vim version 8.2. Last change: 2020 Feb 22
1+
*testing.txt* For Vim version 8.2. Last change: 2020 Apr 10
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -107,7 +107,7 @@ test_null_dict() *test_null_dict()*
107107

108108

109109
test_null_function() *test_null_function()*
110-
Return a |FuncRef| that is null. Only useful for testing.
110+
Return a |Funcref| that is null. Only useful for testing.
111111

112112

113113
test_null_job() *test_null_job()*

0 commit comments

Comments
 (0)