vim-patch:98a29d00a48e

Update runtime files.
98a29d00a4
This commit is contained in:
Jan Edmund Lazo
2021-05-01 22:33:02 -04:00
parent dd2bc06411
commit 8f8602d2df
9 changed files with 60 additions and 42 deletions

View File

@@ -3363,8 +3363,9 @@ delete({fname} [, {flags}]) *delete()*
Note: on MS-Windows it is not possible to delete a directory Note: on MS-Windows it is not possible to delete a directory
that is being used. that is being used.
The result is a Number, which is 0 if the delete operation was The result is a Number, which is 0/false if the delete
successful and -1 when the deletion failed or partly failed. operation was successful and -1/true when the deletion failed
or partly failed.
deletebufline({expr}, {first}[, {last}]) *deletebufline()* deletebufline({expr}, {first}[, {last}]) *deletebufline()*
Delete lines {first} to {last} (inclusive) from buffer {expr}. Delete lines {first} to {last} (inclusive) from buffer {expr}.
@@ -5113,8 +5114,8 @@ has({feature}) Returns 1 if {feature} is supported, 0 otherwise. The
has_key({dict}, {key}) *has_key()* has_key({dict}, {key}) *has_key()*
The result is a Number, which is 1 if |Dictionary| {dict} has The result is a Number, which is TRUE if |Dictionary| {dict}
an entry with key {key}. Zero otherwise. has an entry with key {key}. FALSE otherwise.
haslocaldir([{winnr}[, {tabnr}]]) *haslocaldir()* haslocaldir([{winnr}[, {tabnr}]]) *haslocaldir()*
The result is a Number, which is 1 when the tabpage or window The result is a Number, which is 1 when the tabpage or window
@@ -5132,16 +5133,16 @@ haslocaldir([{winnr}[, {tabnr}]]) *haslocaldir()*
If {winnr} is -1 it is ignored, only the tab is resolved. If {winnr} is -1 it is ignored, only the tab is resolved.
hasmapto({what} [, {mode} [, {abbr}]]) *hasmapto()* hasmapto({what} [, {mode} [, {abbr}]]) *hasmapto()*
The result is a Number, which is 1 if there is a mapping that The result is a Number, which is TRUE if there is a mapping
contains {what} in somewhere in the rhs (what it is mapped to) that contains {what} in somewhere in the rhs (what it is
and this mapping exists in one of the modes indicated by mapped to) and this mapping exists in one of the modes
{mode}. indicated by {mode}.
When {abbr} is there and it is |TRUE| use abbreviations When {abbr} is there and it is |TRUE| use abbreviations
instead of mappings. Don't forget to specify Insert and/or instead of mappings. Don't forget to specify Insert and/or
Command-line mode. Command-line mode.
Both the global mappings and the mappings local to the current Both the global mappings and the mappings local to the current
buffer are checked for a match. buffer are checked for a match.
If no matching mapping is found 0 is returned. If no matching mapping is found FALSE is returned.
The following characters are recognized in {mode}: The following characters are recognized in {mode}:
n Normal mode n Normal mode
v Visual mode v Visual mode
@@ -5172,8 +5173,8 @@ histadd({history}, {item}) *histadd()*
character is sufficient. character is sufficient.
If {item} does already exist in the history, it will be If {item} does already exist in the history, it will be
shifted to become the newest entry. shifted to become the newest entry.
The result is a Number: 1 if the operation was successful, The result is a Number: TRUE if the operation was successful,
otherwise 0 is returned. otherwise FALSE is returned.
Example: > Example: >
:call histadd("input", strftime("%Y %b %d")) :call histadd("input", strftime("%Y %b %d"))
@@ -5192,8 +5193,8 @@ histdel({history} [, {item}]) *histdel()*
an index, see |:history-indexing|. The respective entry will an index, see |:history-indexing|. The respective entry will
be removed if it exists. be removed if it exists.
The result is a Number: 1 for a successful operation, The result is TRUE for a successful operation, otherwise FALSE
otherwise 0 is returned. is returned.
Examples: Examples:
Clear expression register history: > Clear expression register history: >
@@ -5236,7 +5237,7 @@ histnr({history}) *histnr()*
:let inp_index = histnr("expr") :let inp_index = histnr("expr")
< <
hlexists({name}) *hlexists()* hlexists({name}) *hlexists()*
The result is a Number, which is non-zero if a highlight group The result is a Number, which is TRUE if a highlight group
called {name} exists. This is when the group has been called {name} exists. This is when the group has been
defined in some way. Not necessarily when highlighting has defined in some way. Not necessarily when highlighting has
been defined for it, it may also have been used for a syntax been defined for it, it may also have been used for a syntax
@@ -5427,7 +5428,7 @@ inputrestore() *inputrestore()*
Restore typeahead that was saved with a previous |inputsave()|. Restore typeahead that was saved with a previous |inputsave()|.
Should be called the same number of times inputsave() is Should be called the same number of times inputsave() is
called. Calling it more often is harmless though. called. Calling it more often is harmless though.
Returns 1 when there is nothing to restore, 0 otherwise. Returns TRUE when there is nothing to restore, FALSE otherwise.
inputsave() *inputsave()* inputsave() *inputsave()*
Preserve typeahead (also from mappings) and clear it, so that Preserve typeahead (also from mappings) and clear it, so that
@@ -5435,7 +5436,7 @@ inputsave() *inputsave()*
followed by a matching inputrestore() after the prompt. Can followed by a matching inputrestore() after the prompt. Can
be used several times, in which case there must be just as be used several times, in which case there must be just as
many inputrestore() calls. many inputrestore() calls.
Returns 1 when out of memory, 0 otherwise. Returns TRUE when out of memory, FALSE otherwise.
inputsecret({prompt} [, {text}]) *inputsecret()* inputsecret({prompt} [, {text}]) *inputsecret()*
This function acts much like the |input()| function with but This function acts much like the |input()| function with but
@@ -6292,6 +6293,10 @@ mkdir({name} [, {path} [, {prot}]])
If you try to create an existing directory with {path} set to If you try to create an existing directory with {path} set to
"p" mkdir() will silently exit. "p" mkdir() will silently exit.
The function result is a Number, which is TRUE if the call was
successful or FALSE if the directory creation failed or partly
failed.
*mode()* *mode()*
mode([expr]) Return a string that indicates the current mode. mode([expr]) Return a string that indicates the current mode.
If [expr] is supplied and it evaluates to a non-zero Number or If [expr] is supplied and it evaluates to a non-zero Number or
@@ -7394,6 +7399,7 @@ server2client({clientid}, {string}) *server2client()*
Send a reply string to {clientid}. The most recent {clientid} Send a reply string to {clientid}. The most recent {clientid}
that sent a string can be retrieved with expand("<client>"). that sent a string can be retrieved with expand("<client>").
Note: Note:
Returns zero for success, -1 for failure.
This id has to be stored before the next command can be This id has to be stored before the next command can be
received. I.e. before returning from the received command and received. I.e. before returning from the received command and
before calling any commands that waits for input. before calling any commands that waits for input.
@@ -7510,8 +7516,8 @@ setcmdpos({pos}) *setcmdpos()*
before inserting the resulting text. before inserting the resulting text.
When the number is too big the cursor is put at the end of the When the number is too big the cursor is put at the end of the
line. A number smaller than one has undefined results. line. A number smaller than one has undefined results.
Returns 0 when successful, 1 when not editing the command Returns FALSE when successful, TRUE when not editing the
line. command line.
setenv({name}, {val}) *setenv()* setenv({name}, {val}) *setenv()*
Set environment variable {name} to {val}. Set environment variable {name} to {val}.
@@ -7544,8 +7550,8 @@ setline({lnum}, {text}) *setline()*
When {lnum} is just below the last line the {text} will be When {lnum} is just below the last line the {text} will be
added below the last line. added below the last line.
If this succeeds, 0 is returned. If this fails (most likely If this succeeds, FALSE is returned. If this fails (most likely
because {lnum} is invalid) 1 is returned. because {lnum} is invalid) TRUE is returned.
Example: > Example: >
:call setline(5, strftime("%c")) :call setline(5, strftime("%c"))
@@ -9134,7 +9140,7 @@ win_gettype([{nr}]) *win_gettype()*
win_gotoid({expr}) *win_gotoid()* win_gotoid({expr}) *win_gotoid()*
Go to window with ID {expr}. This may also change the current Go to window with ID {expr}. This may also change the current
tabpage. tabpage.
Return 1 if successful, 0 if the window cannot be found. Return TRUE if successful, FALSE if the window cannot be found.
win_id2tabwin({expr} *win_id2tabwin()* win_id2tabwin({expr} *win_id2tabwin()*
Return a list with the tab number and window number of window Return a list with the tab number and window number of window

View File

@@ -136,6 +136,7 @@ can be used to overrule the filetype used for certain extensions:
*.w g:filetype_w |ft-cweb-syntax| *.w g:filetype_w |ft-cweb-syntax|
*.i g:filetype_i |ft-progress-syntax| *.i g:filetype_i |ft-progress-syntax|
*.p g:filetype_p |ft-pascal-syntax| *.p g:filetype_p |ft-pascal-syntax|
*.pp g:filetype_pp |ft-pascal-syntax|
*.sh g:bash_is_sh |ft-sh-syntax| *.sh g:bash_is_sh |ft-sh-syntax|
*.tex g:tex_flavor |ft-tex-plugin| *.tex g:tex_flavor |ft-tex-plugin|

View File

@@ -4005,7 +4005,7 @@ A jump table for the options with a short description can be found at |Q_op|.
the |more-prompt|. When this option is off there are no pauses, the the |more-prompt|. When this option is off there are no pauses, the
listing continues until finished. listing continues until finished.
*'mouse'* *E538* *'mouse'*
'mouse' string (default "") 'mouse' string (default "")
global global

View File

@@ -2303,11 +2303,12 @@ http://papp.plan9.de.
PASCAL *pascal.vim* *ft-pascal-syntax* PASCAL *pascal.vim* *ft-pascal-syntax*
Files matching "*.p" could be Progress or Pascal. If the automatic detection Files matching "*.p" could be Progress or Pascal and those matching "*.pp"
doesn't work for you, or you don't edit Progress at all, use this in your could be Puppet or Pascal. If the automatic detection doesn't work for you,
startup vimrc: > or you only edit Pascal files, use this in your startup vimrc: >
:let filetype_p = "pascal" :let filetype_p = "pascal"
:let filetype_pp = "pascal"
The Pascal syntax file has been extended to take into account some extensions The Pascal syntax file has been extended to take into account some extensions
provided by Turbo Pascal, Free Pascal Compiler and GNU Pascal Compiler. provided by Turbo Pascal, Free Pascal Compiler and GNU Pascal Compiler.

View File

@@ -505,6 +505,9 @@ gO Show a filetype-specific, navigable "outline" of the
if at a visible position. if at a visible position.
Queued messages are processed during the sleep. Queued messages are processed during the sleep.
*:sl!* *:sleep!*
:[N]sl[eep]! [N] [m] Same as above, but hide the cursor
============================================================================== ==============================================================================
2. Using Vim like less or more *less* 2. Using Vim like less or more *less*

View File

@@ -11,9 +11,10 @@ Differences between Vim and Vi *vi-differences*
============================================================================== ==============================================================================
1. Limits *limits* 1. Limits *limits*
Vim has only a few limits for the files that can be edited. Vim has only a few limits for the files that can be edited {Vi: can not handle
<Nul> characters and characters above 128, has limited line length, many other
limits}.
*E340*
Maximum line length 2147483647 characters Maximum line length 2147483647 characters
Maximum number of lines 2147483647 lines Maximum number of lines 2147483647 lines
Maximum file size 2147483647 bytes (2 Gbyte) when a long integer is Maximum file size 2147483647 bytes (2 Gbyte) when a long integer is

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin " Vim filetype plugin
" Language: Vim " Language: Vim
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2021 Jan 05 " Last Change: 2021 Jan 12
" Only do this when not done yet for this buffer " Only do this when not done yet for this buffer
if exists("b:did_ftplugin") if exists("b:did_ftplugin")
@@ -52,12 +52,12 @@ setlocal keywordprg=:help
if "\n" .. join(getline(1, 10), "\n") =~# '\n\s*vim9\%[script]\>' if "\n" .. join(getline(1, 10), "\n") =~# '\n\s*vim9\%[script]\>'
" Set 'comments' to format dashed lists in comments " Set 'comments' to format dashed lists in comments
setlocal com=sO:#\ -,mO:#\ \ ,eO:##,:# setlocal com=sO:#\ -,mO:#\ \ ,eO:##,:#
" Comments start with a double quote in a legacy script; " Comments starts with # in Vim9 script
" with # in a Vim9 script setlocal commentstring=#%s
setlocal commentstring=\"%s
else else
setlocal com=sO:\"\ -,mO:\"\ \ ,:\" setlocal com=sO:\"\ -,mO:\"\ \ ,:\"
setlocal commentstring=#%s " Comments starts with a double quote in legacy script
setlocal commentstring=\"%s
endif endif

View File

@@ -1,7 +1,7 @@
" Vim syntax file " Vim syntax file
" Language: C " Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2020 Aug 28 " Last Change: 2021 Jan 11
" Quit when a (custom) syntax file was already loaded " Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax") if exists("b:current_syntax")
@@ -13,6 +13,9 @@ set cpo&vim
let s:ft = matchstr(&ft, '^\([^.]\)\+') let s:ft = matchstr(&ft, '^\([^.]\)\+')
" check if this was included from cpp.vim
let s:in_cpp_family = exists("b:filetype_in_cpp_family")
" Optional embedded Autodoc parsing " Optional embedded Autodoc parsing
" To enable it add: let g:c_autodoc = 1 " To enable it add: let g:c_autodoc = 1
" to your .vimrc " to your .vimrc
@@ -55,7 +58,7 @@ if !exists("c_no_cformat")
endif endif
" cCppString: same as cString, but ends at end of line " cCppString: same as cString, but ends at end of line
if s:ft ==# "cpp" && !exists("cpp_no_cpp11") && !exists("c_no_cformat") if s:in_cpp_family && !exists("cpp_no_cpp11") && !exists("c_no_cformat")
" ISO C++11 " ISO C++11
syn region cString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend syn region cString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
syn region cCppString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell syn region cCppString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
@@ -87,7 +90,7 @@ syn match cSpecialCharacter display "L\='\\\o\{1,3}'"
syn match cSpecialCharacter display "'\\x\x\{1,2}'" syn match cSpecialCharacter display "'\\x\x\{1,2}'"
syn match cSpecialCharacter display "L'\\x\x\+'" syn match cSpecialCharacter display "L'\\x\x\+'"
if (s:ft ==# "c" && !exists("c_no_c11")) || (s:ft ==# "cpp" && !exists("cpp_no_cpp11")) if (s:ft ==# "c" && !exists("c_no_c11")) || (s:in_cpp_family && !exists("cpp_no_cpp11"))
" ISO C11 or ISO C++ 11 " ISO C11 or ISO C++ 11
if exists("c_no_cformat") if exists("c_no_cformat")
syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell extend syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell extend
@@ -130,7 +133,7 @@ endif
" But avoid matching <::. " But avoid matching <::.
syn cluster cParenGroup contains=cParenError,cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserLabel,cBitField,cOctalZero,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom syn cluster cParenGroup contains=cParenError,cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserLabel,cBitField,cOctalZero,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom
if exists("c_no_curly_error") if exists("c_no_curly_error")
if s:ft ==# 'cpp' && !exists("cpp_no_cpp11") if s:in_cpp_family && !exists("cpp_no_cpp11")
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,@cStringGroup,@Spell syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,@cStringGroup,@Spell
" cCppParen: same as cParen but ends at end-of-line; used in cDefine " cCppParen: same as cParen but ends at end-of-line; used in cDefine
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
@@ -144,7 +147,7 @@ if exists("c_no_curly_error")
syn match cErrInParen display contained "^[{}]\|^<%\|^%>" syn match cErrInParen display contained "^[{}]\|^<%\|^%>"
endif endif
elseif exists("c_no_bracket_error") elseif exists("c_no_bracket_error")
if s:ft ==# 'cpp' && !exists("cpp_no_cpp11") if s:in_cpp_family && !exists("cpp_no_cpp11")
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,@cStringGroup,@Spell syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,@cStringGroup,@Spell
" cCppParen: same as cParen but ends at end-of-line; used in cDefine " cCppParen: same as cParen but ends at end-of-line; used in cDefine
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
@@ -158,7 +161,7 @@ elseif exists("c_no_bracket_error")
syn match cErrInParen display contained "[{}]\|<%\|%>" syn match cErrInParen display contained "[{}]\|<%\|%>"
endif endif
else else
if s:ft ==# 'cpp' && !exists("cpp_no_cpp11") if s:in_cpp_family && !exists("cpp_no_cpp11")
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,@cStringGroup,@Spell syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,@cStringGroup,@Spell
" cCppParen: same as cParen but ends at end-of-line; used in cDefine " cCppParen: same as cParen but ends at end-of-line; used in cDefine
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell
@@ -278,7 +281,7 @@ syn keyword cStorageClass static register auto volatile extern const
if exists("c_gnu") if exists("c_gnu")
syn keyword cStorageClass inline __attribute__ syn keyword cStorageClass inline __attribute__
endif endif
if !exists("c_no_c99") && s:ft !=# 'cpp' if !exists("c_no_c99") && !s:in_cpp_family
syn keyword cStorageClass inline restrict syn keyword cStorageClass inline restrict
endif endif
if !exists("c_no_c11") if !exists("c_no_c11")
@@ -420,7 +423,7 @@ endif
syn cluster cLabelGroup contains=cUserLabel syn cluster cLabelGroup contains=cUserLabel
syn match cUserCont display "^\s*\zs\I\i*\s*:$" contains=@cLabelGroup syn match cUserCont display "^\s*\zs\I\i*\s*:$" contains=@cLabelGroup
syn match cUserCont display ";\s*\zs\I\i*\s*:$" contains=@cLabelGroup syn match cUserCont display ";\s*\zs\I\i*\s*:$" contains=@cLabelGroup
if s:ft ==# 'cpp' if s:in_cpp_family
syn match cUserCont display "^\s*\zs\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup syn match cUserCont display "^\s*\zs\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
syn match cUserCont display ";\s*\zs\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup syn match cUserCont display ";\s*\zs\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
else else

View File

@@ -2,13 +2,16 @@
" Language: C++ " Language: C++
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp) " Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu> " Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
" Last Change: 2019 Dec 18 " Last Change: 2021 Jan 12
" quit when a syntax file was already loaded " quit when a syntax file was already loaded
if exists("b:current_syntax") if exists("b:current_syntax")
finish finish
endif endif
" inform C syntax that the file was included from cpp.vim
let b:filetype_in_cpp_family = 1
" Read the C syntax to start with " Read the C syntax to start with
runtime! syntax/c.vim runtime! syntax/c.vim
unlet b:current_syntax unlet b:current_syntax