summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README_VIM9.md18
-rw-r--r--runtime/autoload/ccomplete.vim36
-rw-r--r--runtime/doc/autocmd.txt6
-rw-r--r--runtime/doc/change.txt4
-rw-r--r--runtime/doc/eval.txt25
-rw-r--r--runtime/doc/map.txt13
-rw-r--r--runtime/doc/popup.txt4
-rw-r--r--runtime/doc/syntax.txt2
-rw-r--r--runtime/doc/tags9
-rw-r--r--runtime/doc/terminal.txt24
-rw-r--r--runtime/doc/todo.txt62
-rw-r--r--runtime/doc/usr_41.txt2
-rw-r--r--runtime/doc/various.txt24
-rw-r--r--runtime/doc/version6.txt2
-rw-r--r--runtime/doc/version8.txt2
-rw-r--r--runtime/doc/vim9.txt4
-rw-r--r--runtime/ftplugin/pbtxt.vim21
-rw-r--r--runtime/synmenu.vim1
-rw-r--r--runtime/syntax/pbtxt.vim44
-rw-r--r--runtime/tutor/tutor6
-rw-r--r--runtime/tutor/tutor.utf-86
21 files changed, 203 insertions, 112 deletions
diff --git a/README_VIM9.md b/README_VIM9.md
index 6c2ee307c..5ee1fdca3 100644
--- a/README_VIM9.md
+++ b/README_VIM9.md
@@ -159,18 +159,18 @@ thing I have been thinking of is assignments without ":let". I often
make that mistake (after writing JavaScript especially). I think it is
possible, if we make local variables shadow commands. That should be OK,
if you shadow a command you want to use, just rename the variable.
-Using "let" and "const" to declare a variable, like in JavaScript and
+Using "var" and "const" to declare a variable, like in JavaScript and
TypeScript, can work:
``` vim
def MyFunction(arg: number): number
- let local = 1
- let todo = arg
+ var local = 1
+ var todo = arg
const ADD = 88
while todo > 0
local += ADD
- --todo
+ todo -= 1
endwhile
return local
enddef
@@ -192,7 +192,7 @@ function and export it:
``` vim
vim9script " Vim9 script syntax used here
-let local = 'local variable is not exported, script-local'
+var local = 'local variable is not exported, script-local'
export def MyFunction() " exported function
...
@@ -248,10 +248,10 @@ END
return luaeval('sum')
endfunc
-def VimNew()
- let sum = 0
+def VimNew(): number
+ var sum = 0
for i in range(1, 2999999)
- let sum += i
+ sum += i
endfor
return sum
enddef
@@ -277,7 +277,7 @@ echo 'Vim new: ' .. reltimestr(reltime(start))
``` vim
def VimNew(): number
- let totallen = 0
+ var totallen = 0
for i in range(1, 100000)
setline(i, ' ' .. getline(i))
totallen += len(getline(i))
diff --git a/runtime/autoload/ccomplete.vim b/runtime/autoload/ccomplete.vim
index 971e7367c..95a20e16b 100644
--- a/runtime/autoload/ccomplete.vim
+++ b/runtime/autoload/ccomplete.vim
@@ -1,13 +1,13 @@
" Vim completion script
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2020 Apr 08
+" Last Change: 2020 Nov 14
let s:cpo_save = &cpo
set cpo&vim
" This function is used for the 'omnifunc' option.
-function! ccomplete#Complete(findstart, base)
+func ccomplete#Complete(findstart, base)
if a:findstart
" Locate the start of the item, including ".", "->" and "[...]".
let line = getline('.')
@@ -244,7 +244,7 @@ function! ccomplete#Complete(findstart, base)
return map(res, 's:Tagline2item(v:val, brackets)')
endfunc
-function! s:GetAddition(line, match, memarg, bracket)
+func s:GetAddition(line, match, memarg, bracket)
" Guess if the item is an array.
if a:bracket && match(a:line, a:match . '\s*\[') > 0
return '['
@@ -260,13 +260,13 @@ function! s:GetAddition(line, match, memarg, bracket)
endif
endif
return ''
-endfunction
+endfunc
" Turn the tag info "val" into an item for completion.
" "val" is is an item in the list returned by taglist().
" If it is a variable we may add "." or "->". Don't do it for other types,
" such as a typedef, by not including the info that s:GetAddition() uses.
-function! s:Tag2item(val)
+func s:Tag2item(val)
let res = {'match': a:val['name']}
let res['extra'] = s:Tagcmd2extra(a:val['cmd'], a:val['name'], a:val['filename'])
@@ -289,10 +289,10 @@ function! s:Tag2item(val)
endif
return res
-endfunction
+endfunc
" Use all the items in dictionary for the "info" entry.
-function! s:Dict2info(dict)
+func s:Dict2info(dict)
let info = ''
for k in sort(keys(a:dict))
let info .= k . repeat(' ', 10 - len(k))
@@ -307,7 +307,7 @@ function! s:Dict2info(dict)
endfunc
" Parse a tag line and return a dictionary with items like taglist()
-function! s:ParseTagline(line)
+func s:ParseTagline(line)
let l = split(a:line, "\t")
let d = {}
if len(l) >= 3
@@ -334,12 +334,12 @@ function! s:ParseTagline(line)
endif
return d
-endfunction
+endfunc
" Turn a match item "val" into an item for completion.
" "val['match']" is the matching item.
" "val['tagline']" is the tagline in which the last part was found.
-function! s:Tagline2item(val, brackets)
+func s:Tagline2item(val, brackets)
let line = a:val['tagline']
let add = s:GetAddition(line, a:val['match'], [a:val], a:brackets == '')
let res = {'word': a:val['match'] . a:brackets . add }
@@ -377,10 +377,10 @@ function! s:Tagline2item(val, brackets)
let res['menu'] = s:Tagcmd2extra(s, a:val['match'], matchstr(line, '[^\t]*\t\zs[^\t]*\ze\t'))
endif
return res
-endfunction
+endfunc
" Turn a command from a tag line to something that is useful in the menu
-function! s:Tagcmd2extra(cmd, name, fname)
+func s:Tagcmd2extra(cmd, name, fname)
if a:cmd =~ '^/^'
" The command is a search command, useful to see what it is.
let x = matchstr(a:cmd, '^/^\s*\zs.*\ze$/')
@@ -395,13 +395,13 @@ function! s:Tagcmd2extra(cmd, name, fname)
let x = a:cmd . ' - ' . a:fname
endif
return x
-endfunction
+endfunc
" Find composing type in "lead" and match items[0] with it.
" Repeat this recursively for items[1], if it's there.
" When resolving typedefs "depth" is used to avoid infinite recursion.
" Return the list of matches.
-function! s:Nextitem(lead, items, depth, all)
+func s:Nextitem(lead, items, depth, all)
" Use the text up to the variable name and split it in tokens.
let tokens = split(a:lead, '\s\+\|\<')
@@ -485,7 +485,7 @@ function! s:Nextitem(lead, items, depth, all)
endfor
return res
-endfunction
+endfunc
" Search for members of structure "typename" in tags files.
@@ -493,7 +493,7 @@ endfunction
" Each match is a dictionary with "match" and "tagline" entries.
" When "all" is non-zero find all, otherwise just return 1 if there is any
" member.
-function! s:StructMembers(typename, items, all)
+func s:StructMembers(typename, items, all)
" Todo: What about local structures?
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
if fnames == ''
@@ -586,12 +586,12 @@ function! s:StructMembers(typename, items, all)
" Failed to find anything.
return []
-endfunction
+endfunc
" For matching members, find matches for following items.
" When "all" is non-zero find all, otherwise just return 1 if there is any
" member.
-function! s:SearchMembers(matches, items, all)
+func s:SearchMembers(matches, items, all)
let res = []
for i in range(len(a:matches))
let typename = ''
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index 0a668c195..c35e89907 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -1,4 +1,4 @@
-*autocmd.txt* For Vim version 8.2. Last change: 2020 Oct 26
+*autocmd.txt* For Vim version 8.2. Last change: 2020 Nov 12
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -70,6 +70,10 @@ effects. Be careful not to destroy your text.
The special pattern <buffer> or <buffer=N> defines a buffer-local autocommand.
See |autocmd-buflocal|.
+If the `:autocmd` is in Vim9 script then {cmd} will be executed as in Vim9
+script. Thus this depends on where the autocmd is defined, not where it is
+triggered.
+
Note: The ":autocmd" command can only be followed by another command when the
'|' appears before {cmd}. This works: >
:augroup mine | au! BufRead | augroup END
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt
index ff12e5d9f..bf425dda5 100644
--- a/runtime/doc/change.txt
+++ b/runtime/doc/change.txt
@@ -1,4 +1,4 @@
-*change.txt* For Vim version 8.2. Last change: 2020 Nov 03
+*change.txt* For Vim version 8.2. Last change: 2020 Nov 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1852,6 +1852,8 @@ found here: |sort()|, |uniq()|.
When /{pattern}/ is specified and there is no [r] flag
the text matched with {pattern} is skipped, so that
you sort on what comes after the match.
+ 'ignorecase' applies to the pattern, but 'smartcase'
+ is not used.
Instead of the slash any non-letter can be used.
For example, to sort on the second comma-separated
field: >
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 3303cab3a..72a66d548 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 8.2. Last change: 2020 Nov 04
+*eval.txt* For Vim version 8.2. Last change: 2020 Nov 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3473,8 +3473,8 @@ byteidx({expr}, {nr}) *byteidx()*
Return byte index of the {nr}'th character in the string
{expr}. Use zero for the first character, it then returns
zero.
- This function is only useful when there are multibyte
- characters, otherwise the returned value is equal to {nr}.
+ If there are no multibyte characters the returned value is
+ equal to {nr}.
Composing characters are not counted separately, their byte
length is added to the preceding base character. See
|byteidxcomp()| below for counting composing characters
@@ -7433,7 +7433,9 @@ matchfuzzy({list}, {str} [, {dict}]) *matchfuzzy()*
matchfuzzypos({list}, {str} [, {dict}]) *matchfuzzypos()*
Same as |matchfuzzy()|, but returns the list of matched
strings and the list of character positions where characters
- in {str} matches.
+ in {str} matches. You can use |byteidx()|to convert a
+ character position to a byte position.
+
If {str} matches multiple times in a string, then only the
positions for the best match is returned.
@@ -8728,11 +8730,16 @@ search({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]])
'ignorecase', 'smartcase' and 'magic' are used.
- When the 'z' flag is not given, searching always starts in
- column zero and then matches before the cursor are skipped.
- When the 'c' flag is present in 'cpo' the next search starts
- after the match. Without the 'c' flag the next search starts
- one column further.
+ When the 'z' flag is not given, forward searching always
+ starts in column zero and then matches before the cursor are
+ skipped. When the 'c' flag is present in 'cpo' the next
+ search starts after the match. Without the 'c' flag the next
+ search starts one column further. This matters for
+ overlapping matches.
+ When searching backwards and the 'z' flag is given then the
+ search starts in column zero, thus no match in the current
+ line will be found (unless wrapping around the end of the
+ file).
When the {stopline} argument is given then the search stops
after searching this line. This is useful to restrict the
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
index 83a5428ce..5132507b0 100644
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -1,4 +1,4 @@
-*map.txt* For Vim version 8.2. Last change: 2020 Nov 12
+*map.txt* For Vim version 8.2. Last change: 2020 Nov 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -319,13 +319,16 @@ Example of using <Cmd> halfway Insert mode: >
nnoremap <F3> aText <Cmd>echo mode(1)<CR> Added<Esc>
Unlike <expr> mappings, there are no special restrictions on the <Cmd>
-command: it is executed as if an (unrestricted) |autocmd| was invoked.
+command: it is executed as if an (unrestricted) |autocommand| was invoked.
Note:
- Because <Cmd> avoids mode-changes it does not trigger |CmdlineEnter| and
|CmdlineLeave| events, because no user interaction is expected.
- For the same reason, |keycodes| like <C-R><C-W> are interpreted as plain,
unmapped keys.
+- The command is not echo'ed, no need for <silent>.
+- In Visual mode you can use `line('v')` and `col('v')` to get one end of the
+ Visual area, the cursor is at the other end.
- In Select mode, |:map| and |:vmap| command mappings are executed in
Visual mode. Use |:smap| to handle Select mode differently.
@@ -1238,9 +1241,9 @@ Otherwise, using "<SID>" outside of a script context is an error.
If you need to get the script number to use in a complicated script, you can
use this function: >
- function s:SID()
- return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze_SID$')
- endfun
+ func s:ScriptNumber()
+ return matchstr(expand('<SID>'), '<SNR>\zs\d\+\ze_')
+ endfunc
The "<SNR>" will be shown when listing functions and mappings. This is useful
to find out what they are defined to.
diff --git a/runtime/doc/popup.txt b/runtime/doc/popup.txt
index 87baee6d8..be0b7e213 100644
--- a/runtime/doc/popup.txt
+++ b/runtime/doc/popup.txt
@@ -1,4 +1,4 @@
-*popup.txt* For Vim version 8.2. Last change: 2020 Oct 17
+*popup.txt* For Vim version 8.2. Last change: 2020 Nov 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -101,7 +101,7 @@ CLOSING THE POPUP WINDOW *popup-close*
Normally the plugin that created the popup window is also in charge of closing
it. If somehow a popup hangs around, you can close all of them with: >
- call popup_clear()
+ call popup_clear(1)
Some popups, such as notifications, close after a specified time. This can be
set with the "time" property on `popup_create()`.
Otherwise, a popup can be closed by clicking on the X in the top-right corner
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 1d4dd1fec..6b38b8c04 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -3006,7 +3006,7 @@ vimrc file: >
(Adapted from the html.vim help text by Claudio Fleiner <claudio@fleiner.com>)
- *ft-posix-synax* *ft-dash-syntax*
+ *ft-posix-syntax* *ft-dash-syntax*
SH *sh.vim* *ft-sh-syntax* *ft-bash-syntax* *ft-ksh-syntax*
This covers syntax highlighting for the older Unix (Bourne) sh, and newer
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 7f07b9ff9..1e9b5dafc 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -2125,6 +2125,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:bad windows.txt /*:bad*
:badd windows.txt /*:badd*
:ball windows.txt /*:ball*
+:balt windows.txt /*:balt*
:bar cmdline.txt /*:bar*
:bd windows.txt /*:bd*
:bdel windows.txt /*:bdel*
@@ -2724,6 +2725,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:map-<unique> map.txt /*:map-<unique>*
:map-alt-keys map.txt /*:map-alt-keys*
:map-arguments map.txt /*:map-arguments*
+:map-cmd map.txt /*:map-cmd*
:map-commands map.txt /*:map-commands*
:map-expression map.txt /*:map-expression*
:map-local map.txt /*:map-local*
@@ -3506,6 +3508,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
<CSI> intro.txt /*<CSI>*
<Char-> map.txt /*<Char->*
<Char> map.txt /*<Char>*
+<Cmd> map.txt /*<Cmd>*
<CursorHold> autocmd.txt /*<CursorHold>*
<D- intro.txt /*<D-*
<D-c> os_mac.txt /*<D-c>*
@@ -3923,6 +3926,9 @@ E1112 eval.txt /*E1112*
E1113 eval.txt /*E1113*
E112 eval.txt /*E112*
E113 eval.txt /*E113*
+E1135 map.txt /*E1135*
+E1136 map.txt /*E1136*
+E1137 map.txt /*E1137*
E114 eval.txt /*E114*
E115 eval.txt /*E115*
E116 eval.txt /*E116*
@@ -6549,7 +6555,7 @@ ft-php-syntax syntax.txt /*ft-php-syntax*
ft-php3-syntax syntax.txt /*ft-php3-syntax*
ft-phtml-syntax syntax.txt /*ft-phtml-syntax*
ft-plaintex-syntax syntax.txt /*ft-plaintex-syntax*
-ft-posix-synax syntax.txt /*ft-posix-synax*
+ft-posix-syntax syntax.txt /*ft-posix-syntax*
ft-postscr-syntax syntax.txt /*ft-postscr-syntax*
ft-ppwiz-syntax syntax.txt /*ft-ppwiz-syntax*
ft-printcap-syntax syntax.txt /*ft-printcap-syntax*
@@ -7745,6 +7751,7 @@ mapmode-s map.txt /*mapmode-s*
mapmode-t map.txt /*mapmode-t*
mapmode-v map.txt /*mapmode-v*
mapmode-x map.txt /*mapmode-x*
+mapnew() eval.txt /*mapnew()*
mapping map.txt /*mapping*
mapping-functions usr_41.txt /*mapping-functions*
mapset() eval.txt /*mapset()*
diff --git a/runtime/doc/terminal.txt b/runtime/doc/terminal.txt
index af6151c94..1d751c37b 100644
--- a/runtime/doc/terminal.txt
+++ b/runtime/doc/terminal.txt
@@ -1,4 +1,4 @@
-*terminal.txt* For Vim version 8.2. Last change: 2020 Sep 04
+*terminal.txt* For Vim version 8.2. Last change: 2020 Nov 15
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -503,6 +503,8 @@ term_dumpdiff({filename}, {filename} [, {options}])
a different attribute
+ missing position in first file
- missing position in second file
+ > cursor position in first file, not in second
+ < cursor position in secone file, not in first
Using the "s" key the top and bottom parts are swapped. This
makes it easy to spot a difference.
@@ -1411,16 +1413,18 @@ If you don't want this then disable it with: >
Vim window width *termdebug_wide*
-To change the width of the Vim window when debugging starts, and use a
-vertical split: >
- let g:termdebug_wide = 163
-This will set &columns to 163 when `:Termdebug` is used. The value is restored
-when quitting the debugger.
-If g:termdebug_wide is set and &columns is already larger than
-g:termdebug_wide then a vertical split will be used without changing &columns.
-Set it to 1 to get a vertical split without every changing &columns (useful
-for when the terminal can't be resized by Vim).
+To change the width of the Vim window when debugging starts and use a vertical
+split: >
+ let g:termdebug_wide = 163
+This will set 'columns' to 163 when `:Termdebug` is used. The value is
+restored when quitting the debugger.
+
+If g:termdebug_wide is set and 'columns' is already a greater value, then a
+vertical split will be used without modifying 'columns'.
+
+Set g:termdebug_wide to 1 to use a vertical split without ever changing
+'columns'. This is useful when the terminal can't be resized by Vim.
vim:tw=78:ts=8:noet:ft=help:norl:
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 713bad643..b8088d545 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 8.2. Last change: 2020 Nov 04
+*todo.txt* For Vim version 8.2. Last change: 2020 Nov 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -38,21 +38,18 @@ browser use: https://github.com/vim/vim/issues/1234
*known-bugs*
-------------------- Known bugs and current work -----------------------
-test_vim9_func fails: type from default value not used.
-
-Without extra sleeps netbeans test has valgrind errors.
-PR #7248 from Yegappan - test doesn't fail without code changes
-
-Making everything work:
-- Closure argument call should not always set varargs, like any function call?
-- Invoke user command in a :def function
-- Make map() give an error if the resulting type is wrong.
- Add mapnew() or mapcopy() to create a new List/Dict for the result, which
- can have a different value type.
-- Error message for "'yes && 0" is "using String as a Number", should be "using
- String as a Bool".
+Coverity errors in October and November.
+
+Vim9 - Change
+- Drop support for #{} early December. Close #7310
+ -> Does it work to recognize lambda?
+ {x: int -> x + 5}
+ var int = 5
+ {x: int, y: int}
+Vim9 - Making everything work:
+- Make map() give an error if the resulting type of the first argument is
+ wrong. Only works if the type is known?
- Run the same tests in :def and Vim9 script, like in Test_expr7_not()
-- In autocmd: use legacy syntax, not whatever the current script uses?
- need to check type when a declaration specifies a type: #6507
let nr: number = 'asdf'
- Check many more builtin function arguments at compile time.
@@ -60,7 +57,7 @@ Making everything work:
the script-local function, not a global one.
- Make sure that where a callback is expected a function can be used (without
quotes). E.g. sort() and map(). Also at the script level.
-- assignment to more complex lval: list[1][2][3] = 8
+- assignment to more complex lval: list[1][2][3] = 8 #7309
Also "list[0] += value". test in Test_assign_dict_unknown_type().
- ":put" with ISN_PUT does not handle range correctly, e.g. ":$-2put".
Add command to parse range at runtime?
@@ -91,11 +88,13 @@ Making everything work:
- Check that when using a user function name without prefix, it does not find
a global function. Prefixing g: is required.
- Compile: for [key, value] in items(map)
-- Assignment to dict doesn't work:
- let ret: dict<string> = #{}
- ret[i] = string(i)
-- Appending to dict item doesn't work:
- let d[i] ..= value
+- Need the equivalent of get_lval() and set_var_lval() to implement assignment
+ to nested list and dict members.
+ - Assignment to dict doesn't work:
+ let ret: dict<string> = #{}
+ ret[i] = string(i)
+ - Appending to dict item doesn't work:
+ let d[i] ..= value
- Using ".." at script level doesn't convert arguments to a string.
- Compile replacement of :s command: s/pat/\=expr/
- Compile redir to local variable: var_redir_start().
@@ -114,8 +113,6 @@ Making everything work:
- expandcmd() with `=expr` in filename uses legacy expression.
- eval_expr() in ex_cexpr()
- eval_expr() call in dbg_parsearg() and debuggy_find()
-- has() is compiled as a constant, but some checks are dynamic.
- Check for dynamic values, such as "gui_running".
New syntax and functionality:
Improve error checking:
- "echo Func()" is an error if Func() does not return anything.
@@ -138,7 +135,7 @@ Also:
- implement enum
- Make accessing varargs faster: arg[expr]
EVAL expr
- LOADVARARG (varags idx)
+ LOADVARARG (varargs idx)
- Make debugging work - at least per function. Need to recompile a function
to step through it line-by-line? Evaluate the stack and variables on the
stack?
@@ -348,6 +345,8 @@ Patch to make :q work with local arglist. (Christian Brabandt, #6286)
Why does Test_invalid_sid() not work in the GUI?
+":pedit" ignores the local working directory when 'pvp' is set (#7267)
+
Lua: updating wrong buffer when using newly created, unloaded buffer.
(#6539)
@@ -417,9 +416,6 @@ Another spurious BufDelete. (Dani Dickstein, #5701)
Wrong error when using local arglist. (Harm te Hennepe, #6133)
-Request to support <Cmd> in mappings, similar to how Neovim does this.
-(Daniel Hahler, #4784)
-
Test loose_clipboard() by selecting text before suspending.
Undo puts cursor in wrong line after "cG<Esc>" undo.
@@ -441,9 +437,6 @@ Also put :argadd commands at the start for all buffers, so that their order
remains equal? Then %argdel to clean it up. Do try this with 'hidden' set.
Also #5326: netrw buffers are not restored.
-Alternate file is not set in the session file. Use setwintabvar("@#") ?
-(#6714)
-
When 'backupdir' has a path ending in double slash (meaning: use full path of
the file) combined with 'patchmode' the file name is wrong. (#5791)
@@ -1067,7 +1060,7 @@ neovim #7431)
Patch for improving detecting Ruby on Mac in configure. (Ilya Mikhaltsou, 2017
Nov 21)
-When t_Co is changed from termresponse, the OptionSet autocmmand event isn't
+When t_Co is changed from termresponse, the OptionSet autocommand event isn't
triggered. Use the code from the end of set_num_option() in
set_color_count().
@@ -1352,6 +1345,9 @@ no longer support.
sort() is not stable when using numeric/float sort (Nikolay Pavlov, 2016 Sep
4#1038)
+sort() does not use 'smartcase' for the skip pattern, even though 'ignorecase'
+is used. (Filipe Brandenburger, #7322)
+
+channel:
- Add a in_cb, invoked when the write buffer has become empty. (Matteo Landi)
- Add ch_readlines(): for a channel in NL mode, reads as many lines as are
@@ -2297,7 +2293,7 @@ Additional info by Dominique Pelle. (also on 2010 Apr 10)
CreateFile and CreateFileW are used without sharing, filewritable() fails when
the file was already open (e.g. script is being sourced). Add FILE_SHARE_READ|
-FILE_SHARE_WRITE in mch_access()? (Phillippe Vaucher, 2010 Nov 2)
+FILE_SHARE_WRITE in mch_access()? (Philippe Vaucher, 2010 Nov 2)
Is ~/bin (literally) in $PATH supposed to work? (Paul, 2010 March 29)
Looks like only bash can do it. (Yakov Lerner)
@@ -5933,7 +5929,7 @@ Writing files:
losing the original when writing twice. (Slootman)
7 On non-Unix machines, also overwrite the original file in some situations
(file system full, it's a link on an NFS partition).
-7 When editing a file, check that it has been change outside of Vim more
+7 When editing a file, check that it has been changed outside of Vim more
often, not only when writing over it. E.g., at the time the swap file is
flushed. Or every ten seconds or so (use the time of day, check it before
waiting for a character to be typed).
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index ea9cfbbec..126dbc4b4 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -1,4 +1,4 @@
-*usr_41.txt* For Vim version 8.2. Last change: 2020 Aug 30
+*usr_41.txt* For Vim version 8.2. Last change: 2020 Nov 09
VIM USER MANUAL - by Bram Moolenaar
diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
index 09fe96424..a895a5eb5 100644
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -1,4 +1,4 @@
-*various.txt* For Vim version 8.2. Last change: 2020 Aug 20
+*various.txt* For Vim version 8.2. Last change: 2020 Nov 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -142,15 +142,17 @@ g8 Print the hex values of the bytes used in the
quit
<
*:z* *E144*
-:{range}z[+-^.=]{count} Display several lines of text surrounding the line
- specified with {range}, or around the current line
- if there is no {range}. If there is a {count}, that's
- how many lines you'll see; if there is no {count} and
- only one window then twice the value of the 'scroll'
- option is used, otherwise the current window height
- minus 3 is used.
-
- If there is a {count} the 'window' option is set to
+:[range]z[+-^.=][count] Display several lines of text surrounding the line
+ specified with [range], or around the current line
+ if there is no [range].
+
+ If there is a [count], that's how many lines you'll
+ see; if there is no [count] and only one window then
+ twice the value of the 'scroll' option is used,
+ otherwise the current window height minus 3 is used.
+ This is the value of "scr" in the table below.
+
+ If there is a [count] the 'window' option is set to
its value.
:z can be used either alone or followed by any of
@@ -168,7 +170,7 @@ g8 Print the hex values of the bytes used in the
If the mark is "=", a line of dashes is printed
around the current line.
-:{range}z#[+-^.=]{count} *:z#*
+:[range]z#[+-^.=][count] *:z#*
Like ":z", but number the lines.
*:=*
diff --git a/runtime/doc/version6.txt b/runtime/doc/version6.txt
index f54cde9be..82405e7f5 100644
--- a/runtime/doc/version6.txt
+++ b/runtime/doc/version6.txt
@@ -1331,7 +1331,7 @@ eventhandler() Returns 1 when inside an event handler and interactive
executable() Checks if a program or batch script can be executed.
filewritable() Checks if a file can be written. (Ron Aaron)
foldclosed() Find out if there is a closed fold. (Johannes Zellner).
-foldcloseend() Find the end of a closed fold.
+foldclosedend() Find the end of a closed fold.
foldlevel() Find out the foldlevel. (Johannes Zellner)
foreground() Move the GUI window to the foreground.
getchar() Get one character from the user. Can be used to define a
diff --git a/runtime/doc/version8.txt b/runtime/doc/version8.txt
index 8f38d9b47..951a3070f 100644
--- a/runtime/doc/version8.txt
+++ b/runtime/doc/version8.txt
@@ -42557,7 +42557,7 @@ Files: src/buffer.c, src/testdir/test_statusline.vim,
src/testdir/dumps/Test_statusline_1.dump
Patch 8.2.0236
-Problem: MS-Windows uninstall doesn't delete vimtutur.bat.
+Problem: MS-Windows uninstall doesn't delete vimtutor.bat.
Solution: Change directory before deletion. (Ken Takata, closes #5603)
Files: src/uninstall.c
diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt
index b63e7194b..9d42b68d0 100644
--- a/runtime/doc/vim9.txt
+++ b/runtime/doc/vim9.txt
@@ -1,4 +1,4 @@
-*vim9.txt* For Vim version 8.2. Last change: 2020 Oct 17
+*vim9.txt* For Vim version 8.2. Last change: 2020 Nov 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -438,7 +438,7 @@ literally dictionaries were introduced in a backwards compatible way: >
let dict = #{key: value}
However, this #{} syntax is unlike any existing language. As it appears that
-using a literaly key is much more common than using an expression, and
+using a literal key is much more common than using an expression, and
considering that JavaScript uses this syntax, using the {} form for dictionary
literals was considered a much more useful syntax. In Vim9 script the {} form
uses literal keys: >
diff --git a/runtime/ftplugin/pbtxt.vim b/runtime/ftplugin/pbtxt.vim
new file mode 100644
index 000000000..e3c1bf765
--- /dev/null
+++ b/runtime/ftplugin/pbtxt.vim
@@ -0,0 +1,21 @@
+" Vim filetype plugin file
+" Language: Protobuf Text Format
+" Maintainer: Lakshay Garg <lakshayg@outlook.in>
+" Last Change: 2020 Nov 17
+" Homepage: https://github.com/lakshayg/vim-pbtxt
+
+if exists("b:did_ftplugin")
+ finish
+endif
+
+let b:did_ftplugin = 1
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+setlocal commentstring=#\ %s
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
+
+" vim: nowrap sw=2 sts=2 ts=8 noet
diff --git a/runtime/synmenu.vim b/runtime/synmenu.vim
index 3367c68d3..d1e4becb2 100644
--- a/runtime/synmenu.vim
+++ b/runtime/synmenu.vim
@@ -404,6 +404,7 @@ an 50.90.120 &Syntax.PQ.Pam\ config :cal SetSyn("pamconf")<CR>
an 50.90.130 &Syntax.PQ.PApp :cal SetSyn("papp")<CR>
an 50.90.140 &Syntax.PQ.Pascal :cal SetSyn("pascal")<CR>
an 50.90.150 &Syntax.PQ.Password\ file :cal SetSyn("passwd")<CR>
+an 50.90.490 &Syntax.PQ.Pbtxt :cal SetSyn("pbtxt")<CR>
an 50.90.160 &Syntax.PQ.PCCTS :cal SetSyn("pccts")<CR>
an 50.90.170 &Syntax.PQ.PDF :cal SetSyn("pdf")<CR>
an 50.90.180 &Syntax.PQ.Perl.Perl :cal SetSyn("perl")<CR>
diff --git a/runtime/syntax/pbtxt.vim b/runtime/syntax/pbtxt.vim
new file mode 100644
index 000000000..92a75560e
--- /dev/null
+++ b/runtime/syntax/pbtxt.vim
@@ -0,0 +1,44 @@
+" Vim syntax file
+" Language: Protobuf Text Format
+" Maintainer: Lakshay Garg <lakshayg@outlook.in>
+" Last Change: 2020 Nov 17
+" Homepage: https://github.com/lakshayg/vim-pbtxt
+
+if exists("b:current_syntax")
+ finish
+endif
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+syn case ignore
+
+syn keyword pbtxtTodo TODO FIXME contained
+syn keyword pbtxtBool true false contained
+
+syn match pbtxtInt display "\<\(0\|[1-9]\d*\)\>"
+syn match pbtxtHex display "\<0[xX]\x\+\>"
+syn match pbtxtFloat display "\(0\|[1-9]\d*\)\=\.\d*"
+syn match pbtxtMessage display "^\s*\w\+\s*{"me=e-1
+syn match pbtxtField display "^\s*\w\+:"me=e-1
+syn match pbtxtEnum display ":\s*\a\w\+"ms=s+1 contains=pbtxtBool
+syn region pbtxtString start=+"+ skip=+\\"+ end=+"+ contains=@Spell
+syn region pbtxtComment start="#" end="$" keepend contains=pbtxtTodo,@Spell
+
+hi def link pbtxtTodo Todo
+hi def link pbtxtBool Boolean
+hi def link pbtxtInt Number
+hi def link pbtxtHex Number
+hi def link pbtxtFloat Float
+hi def link pbtxtMessage Structure
+hi def link pbtxtField Identifier
+hi def link pbtxtEnum Define
+hi def link pbtxtString String
+hi def link pbtxtComment Comment
+
+let b:current_syntax = "pbtxt"
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
+
+" vim: nowrap sw=2 sts=2 ts=8 noet
diff --git a/runtime/tutor/tutor b/runtime/tutor/tutor
index ed3d076f2..fdfd09c13 100644
--- a/runtime/tutor/tutor
+++ b/runtime/tutor/tutor
@@ -319,7 +319,7 @@ NOTE: Pressing just the motion while in Normal mode without an operator will
---> 6) Sugar is sweet
---> 7) And so are you.
-Doubling to operate on a line also works for operators mentioned below
+Doubling to operate on a line also works for operators mentioned below.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 2.7: THE UNDO COMMAND
@@ -433,7 +433,7 @@ NOTE: Remember that you should be learning by doing, not memorization.
---> This line has a few words that need changing using the change operator.
Notice that ce deletes the word and places you in Insert mode.
- cc does the same for the whole line
+ cc does the same for the whole line.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -804,7 +804,7 @@ NOTE: Replace mode is like Insert mode, but every typed character deletes an
b)
NOTE: You can also use y as an operator: yw yanks one word,
- yy yanks the whole line, then p puts that line
+ yy yanks the whole line, then p puts that line.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 6.5: SET OPTION
diff --git a/runtime/tutor/tutor.utf-8 b/runtime/tutor/tutor.utf-8
index ed3d076f2..fdfd09c13 100644
--- a/runtime/tutor/tutor.utf-8
+++ b/runtime/tutor/tutor.utf-8
@@ -319,7 +319,7 @@ NOTE: Pressing just the motion while in Normal mode without an operator will
---> 6) Sugar is sweet
---> 7) And so are you.
-Doubling to operate on a line also works for operators mentioned below
+Doubling to operate on a line also works for operators mentioned below.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 2.7: THE UNDO COMMAND
@@ -433,7 +433,7 @@ NOTE: Remember that you should be learning by doing, not memorization.
---> This line has a few words that need changing using the change operator.
Notice that ce deletes the word and places you in Insert mode.
- cc does the same for the whole line
+ cc does the same for the whole line.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -804,7 +804,7 @@ NOTE: Replace mode is like Insert mode, but every typed character deletes an
b)
NOTE: You can also use y as an operator: yw yanks one word,
- yy yanks the whole line, then p puts that line
+ yy yanks the whole line, then p puts that line.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 6.5: SET OPTION