Skip to content

Commit

Permalink
Merge remote-tracking branch 'vim/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ychin committed Apr 11, 2020
2 parents 578547c + d1caa94 commit 74283d8
Show file tree
Hide file tree
Showing 83 changed files with 1,164 additions and 546 deletions.
4 changes: 3 additions & 1 deletion runtime/autoload/ccomplete.vim
@@ -1,7 +1,7 @@
" Vim completion script
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2018 Aug 20
" Last Change: 2020 Apr 08

let s:cpo_save = &cpo
set cpo&vim
Expand Down Expand Up @@ -635,3 +635,5 @@ endfunc

let &cpo = s:cpo_save
unlet s:cpo_save

" vim: noet sw=2 sts=2
4 changes: 2 additions & 2 deletions runtime/autoload/dist/ft.vim
@@ -1,7 +1,7 @@
" Vim functions for file type detection
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2020 Jan 02
" Last Change: 2020 Mar 30

" These functions are moved here from runtime/filetype.vim to make startup
" faster.
Expand Down Expand Up @@ -325,7 +325,7 @@ endfunc

func dist#ft#FTmm()
let n = 1
while n < 10
while n < 20
let line = getline(n)
if line =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|/\*\)'
setf objcpp
Expand Down
2 changes: 1 addition & 1 deletion runtime/doc/change.txt
Expand Up @@ -1458,7 +1458,7 @@ text. Put it in your autoload directory, e.g. ~/.vim/autoload/format.vim: >
func! format#Format()
" only reformat on explicit gq command
if mode() != 'n'
" fall back to Vims internal reformatting
" fall back to Vim's internal reformatting
return 1
endif
let lines = getline(v:lnum, v:lnum + v:count - 1)
Expand Down
35 changes: 16 additions & 19 deletions runtime/doc/eval.txt
@@ -1,4 +1,4 @@
*eval.txt* For Vim version 8.2. Last change: 2020 Mar 26
*eval.txt* For Vim version 8.2. Last change: 2020 Apr 08


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

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

Returns zero for success, -1 for failure.

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

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

Example: >
function Something(key, value = 10)
Expand Down Expand Up @@ -11294,9 +11290,10 @@ Example that does NOT work: >
:function NoGood(first = a:second, second = 10)
:endfunction
<
When not using "...", the number of arguments in a function call must be equal
to the number of mandatory named arguments. When using "...", the number of
arguments may be larger.
When not using "...", the number of arguments in a function call must be at
least equal to the number of mandatory named arguments. When using "...", the
number of arguments may be larger than the total of mandatory and optional
arguments.

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

:let [{name}, ..., ; {lastname}] = {expr1}
:let [{name}, ..., ; {lastname}] = {expr1} *E452*
Like |:let-unpack| above, but the |List| may have more
items than there are names. A list of the remaining
items is assigned to {lastname}. If there are no
Expand Down
2 changes: 1 addition & 1 deletion runtime/doc/gui_w32.txt
Expand Up @@ -199,7 +199,7 @@ With..." menu. This means you can use Vim to edit many files. Not every file
One reason to add this is to be able to edit HTML files directly from Internet
Explorer. To enable this use the "Tools" menu, "Internet Options..." entry.
In the dialog select the "Programs" tab and select Vim in the "HTML editor"
choice. If it's not there than installing didn't work properly.
choice. If it's not there then installing didn't work properly.

Doing this manually can be done with this script:

Expand Down
8 changes: 4 additions & 4 deletions runtime/doc/help.txt
@@ -1,4 +1,4 @@
*help.txt* For Vim version 8.2. Last change: 2019 Jul 21
*help.txt* For Vim version 8.2. Last change: 2020 Apr 05

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

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

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

Programming language support ~
|indent.txt| automatic indenting for C and other languages
Expand Down
8 changes: 8 additions & 0 deletions runtime/doc/insert.txt
Expand Up @@ -154,6 +154,8 @@ CTRL-R CTRL-R {register} *i_CTRL-R_CTRL-R*
you also want to avoid these, use CTRL-R CTRL-O, see below.
The '.' register (last inserted text) is still inserted as
typed.
After this command, the '.' register contains the text from
the register as if it was inserted by typing it.

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

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

*i_CTRL-T*
CTRL-T Insert one shiftwidth of indent at the start of the current
Expand Down
4 changes: 2 additions & 2 deletions runtime/doc/options.txt
@@ -1,4 +1,4 @@
*options.txt* For Vim version 8.2. Last change: 2020 Mar 02
*options.txt* For Vim version 8.2. Last change: 2020 Apr 10


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -8107,7 +8107,7 @@ A jump table for the options with a short description can be found at |Q_op|.
- VIM the server name |v:servername| or "VIM"
Only works if the terminal supports setting window titles
(currently Amiga console, Win32 console, all GUI versions and
terminals with a non- empty 't_ts' option - these are Unix xterm and
terminals with a non-empty 't_ts' option - these are Unix xterm and
iris-ansi by default, where 't_ts' is taken from the builtin termcap).
*X11*
When Vim was compiled with HAVE_X11 defined, the original title will
Expand Down
2 changes: 1 addition & 1 deletion runtime/doc/os_beos.txt
Expand Up @@ -138,7 +138,7 @@ and merge it back in.

6. The $VIM directory *beos-vimdir*

$VIM is the symbolic name for the place where Vims support files are stored.
$VIM is the symbolic name for the place where Vim's support files are stored.
The default value for $VIM is set at compile time and can be determined with >
:version
Expand Down
2 changes: 1 addition & 1 deletion runtime/doc/os_haiku.txt
Expand Up @@ -88,7 +88,7 @@ Stuff that does not work yet:

4. The $VIM directory *haiku-vimdir*

$VIM is the symbolic name for the place where Vims support files are stored.
$VIM is the symbolic name for the place where Vim's support files are stored.
The default value for $VIM is set at compile time and can be determined with >
:version
Expand Down
2 changes: 2 additions & 0 deletions runtime/doc/tags
Expand Up @@ -4298,6 +4298,7 @@ E447 editing.txt /*E447*
E448 various.txt /*E448*
E449 eval.txt /*E449*
E45 message.txt /*E45*
E452 eval.txt /*E452*
E455 print.txt /*E455*
E456 print.txt /*E456*
E457 print.txt /*E457*
Expand Down Expand Up @@ -9477,6 +9478,7 @@ tags-file-format tagsrch.txt /*tags-file-format*
tags-option tagsrch.txt /*tags-option*
tagsrch.txt tagsrch.txt /*tagsrch.txt*
tagstack tagsrch.txt /*tagstack*
tagstack-examples tagsrch.txt /*tagstack-examples*
tan() eval.txt /*tan()*
tanh() eval.txt /*tanh()*
tar pi_tar.txt /*tar*
Expand Down
25 changes: 24 additions & 1 deletion runtime/doc/tagsrch.txt
@@ -1,4 +1,4 @@
*tagsrch.txt* For Vim version 8.2. Last change: 2020 Jan 30
*tagsrch.txt* For Vim version 8.2. Last change: 2020 Apr 03


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

*tagstack-examples*
Write to the tag stack just like `:tag` but with a user-defined
jumper#jump_to_tag function: >
" Store where we're jumping from before we jump.
let tag = expand('<cword>')
let pos = [bufnr()] + getcurpos()[1:]
let item = {'bufnr': pos[0], 'from': pos, 'tagname': tag}
if jumper#jump_to_tag(tag)
" Jump was successful, write previous location to tag stack.
let winid = win_getid()
let stack = gettagstack(winid)
let stack['items'] = [item]
call settagstack(winid, stack, 't')
endif
<
Set current index of the tag stack to 4: >
call settagstack(1005, {'curidx' : 4})
<
Push a new item onto the tag stack: >
let pos = [bufnr('myfile.txt'), 10, 1, 0]
let newtag = [{'tagname' : 'mytag', 'from' : pos}]
call settagstack(2, {'items' : newtag}, 'a')
<
*E73*
When you try to use the tag stack while it doesn't contain anything you will
get an error message.
Expand Down
2 changes: 1 addition & 1 deletion runtime/doc/terminal.txt
Expand Up @@ -960,7 +960,7 @@ Currently supported commands:
directory, thus it's best to use the full path.

[options] is only used when opening a new window. If present,
it must be a Dict. Similarly to |++opt|, These entries are
it must be a Dict. Similarly to |++opt|, these entries are
recognized:
"ff" file format: "dos", "mac" or "unix"
"fileformat" idem
Expand Down
4 changes: 2 additions & 2 deletions runtime/doc/testing.txt
@@ -1,4 +1,4 @@
*testing.txt* For Vim version 8.2. Last change: 2020 Feb 22
*testing.txt* For Vim version 8.2. Last change: 2020 Apr 10


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -107,7 +107,7 @@ test_null_dict() *test_null_dict()*


test_null_function() *test_null_function()*
Return a |FuncRef| that is null. Only useful for testing.
Return a |Funcref| that is null. Only useful for testing.


test_null_job() *test_null_job()*
Expand Down

0 comments on commit 74283d8

Please sign in to comment.