summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-09-21 20:09:51 +0200
committerBram Moolenaar <Bram@vim.org>2021-09-21 20:09:51 +0200
commit34cc7d8c034f2bc5b57455577051db8d72e2b87c (patch)
treede1790044f221b5cc942b47d42dff8b847fd9db3 /runtime
parent690c524ce6629f9ff67728541ba211f831caf0ee (diff)
Update runtime files
Diffstat (limited to 'runtime')
-rw-r--r--runtime/autoload/csscomplete.vim6
-rw-r--r--runtime/doc/eval.txt12
-rw-r--r--runtime/doc/filetype.txt8
-rw-r--r--runtime/doc/map.txt2
-rw-r--r--runtime/doc/options.txt8
-rw-r--r--runtime/doc/tags8
-rw-r--r--runtime/doc/todo.txt15
-rw-r--r--runtime/doc/usr_41.txt2
-rw-r--r--runtime/doc/vim9.txt11
-rw-r--r--runtime/filetype.vim2
-rw-r--r--runtime/ftplugin/8th.vim10
-rw-r--r--runtime/ftplugin/c.vim10
-rw-r--r--runtime/ftplugin/gprof.vim22
-rw-r--r--runtime/syntax/go.vim6
-rw-r--r--runtime/syntax/gprof.vim5
-rw-r--r--runtime/syntax/php.vim267
-rw-r--r--runtime/syntax/vim.vim16
-rw-r--r--runtime/tutor/tutor20
-rw-r--r--runtime/tutor/tutor.utf-820
19 files changed, 362 insertions, 88 deletions
diff --git a/runtime/autoload/csscomplete.vim b/runtime/autoload/csscomplete.vim
index 85e40c862f..4b673ac9b8 100644
--- a/runtime/autoload/csscomplete.vim
+++ b/runtime/autoload/csscomplete.vim
@@ -4,7 +4,7 @@
" plus CSS Speech Module <http://www.w3.org/TR/css3-speech/>
" Maintainer: Kao, Wei-Ko(othree) ( othree AT gmail DOT com )
" Original Author: Mikolaj Machowski ( mikmach AT wp DOT pl )
-" Last Change: 2018 Jul 02
+" Last Change: 2021 Sep 21
let s:values = split("all additive-symbols align-content align-items align-self animation animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function backface-visibility background background-attachment background-blend-mode background-clip background-color background-image background-origin background-position background-repeat background-size block-size border border-block-end border-block-end-color border-block-end-style border-block-end-width border-block-start border-block-start-color border-block-start-style border-block-start-width border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border-collapse border-color border-image border-image-outset border-image-repeat border-image-slice border-image-source border-image-width border-inline-end border-inline-end-color border-inline-end-style border-inline-end-width border-inline-start border-inline-start-color border-inline-start-style border-inline-start-width border-left border-left-color border-left-style border-left-width border-radius border-right border-right-color border-right-style border-right-width border-spacing border-style border-top border-top-color border-top-left-radius border-top-right-radius border-top-style border-top-width border-width bottom box-decoration-break box-shadow box-sizing break-after break-before break-inside caption-side clear clip clip-path color columns column-count column-fill column-gap column-rule column-rule-color column-rule-style column-rule-width column-span column-width content counter-increment counter-reset cue cue-before cue-after cursor direction display empty-cells fallback filter flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap float font font-family font-feature-settings font-kerning font-language-override font-size font-size-adjust font-stretch font-style font-synthesis font-variant font-variant-alternates font-variant-caps font-variant-east-asian font-variant-ligatures font-variant-numeric font-variant-position font-weight grid grid-area grid-auto-columns grid-auto-flow grid-auto-position grid-auto-rows grid-column grid-column-start grid-column-end grid-row grid-row-start grid-row-end grid-template grid-template-areas grid-template-rows grid-template-columns height hyphens image-rendering image-resolution image-orientation ime-mode inline-size isolation justify-content left letter-spacing line-break line-height list-style list-style-image list-style-position list-style-type margin margin-block-end margin-block-start margin-bottom margin-inline-end margin-inline-start margin-left margin-right margin-top marks mask mask-type max-block-size max-height max-inline-size max-width max-zoom min-block-size min-height min-inline-size min-width min-zoom mix-blend-mode negative object-fit object-position offset-block-end offset-block-start offset-inline-end offset-inline-start opacity order orientation orphans outline outline-color outline-offset outline-style outline-width overflow overflow-wrap overflow-x overflow-y pad padding padding-block-end padding-block-start padding-bottom padding-inline-end padding-inline-start padding-left padding-right padding-top page-break-after page-break-before page-break-inside pause-before pause-after pause perspective perspective-origin pointer-events position prefix quotes range resize rest rest-before rest-after right ruby-align ruby-merge ruby-position scroll-behavior scroll-snap-coordinate scroll-snap-destination scroll-snap-points-x scroll-snap-points-y scroll-snap-type scroll-snap-type-x scroll-snap-type-y shape-image-threshold shape-margin shape-outside speak speak-as suffix symbols system table-layout tab-size text-align text-align-last text-combine-upright text-decoration text-decoration-color text-decoration-line text-emphasis text-emphasis-color text-emphasis-position text-emphasis-style text-indent text-orientation text-overflow text-rendering text-shadow text-transform text-underline-position top touch-action transform transform-box transform-origin transform-style transition transition-delay transition-duration transition-property transition-timing-function unicode-bidi unicode-range user-zoom vertical-align visibility voice-balance voice-duration voice-family voice-pitch voice-rate voice-range voice-stress voice-volume white-space widows width will-change word-break word-spacing word-wrap writing-mode z-index zoom")
@@ -38,12 +38,12 @@ function! csscomplete#CompleteCSS(findstart, base)
if exists("b:compl_context")
let line = getline('.')
let compl_begin = col('.') - 2
- let after = line[compl_begin:]
+ let b:after = line[compl_begin:]
let line = b:compl_context
unlet! b:compl_context
else
let line = a:base
- let after = ''
+ let b:after = ''
endif
let res = []
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index a969104e94..977473a2e3 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 8.2. Last change: 2021 Sep 08
+*eval.txt* For Vim version 8.2. Last change: 2021 Sep 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -658,7 +658,7 @@ It is not necessary to use the "dict" attribute for a numbered function.
If you get an error for a numbered function, you can find out what it is with
a trick. Assuming the function is 42, the command is: >
- :function {42}
+ :function g:42
Functions for Dictionaries ~
@@ -6140,6 +6140,7 @@ getreg([{regname} [, 1 [, {list}]]]) *getreg()*
(see |NL-used-for-Nul|).
When the register was not set an empty list is returned.
+ If {regname} is "", the unnamed register '"' is used.
If {regname} is not specified, |v:register| is used.
In |Vim9-script| {regname} must be one character.
@@ -6167,6 +6168,7 @@ getreginfo([{regname}]) *getreginfo()*
The {regname} argument is a string. If {regname} is invalid
or not set, an empty Dictionary will be returned.
+ If {regname} is "" or "@", the unnamed register '"' is used.
If {regname} is not specified, |v:register| is used.
The returned Dictionary can be passed to |setreg()|.
In |Vim9-script| {regname} must be one character.
@@ -6182,8 +6184,9 @@ getregtype([{regname}]) *getregtype()*
"<CTRL-V>{width}" for |blockwise-visual| text
"" for an empty or unknown register
<CTRL-V> is one character with value 0x16.
- The {regname} argument is a string. If {regname} is not
- specified, |v:register| is used.
+ The {regname} argument is a string. If {regname} is "", the
+ unnamed register '"' is used. If {regname} is not specified,
+ |v:register| is used.
In |Vim9-script| {regname} must be one character.
Can also be used as a |method|: >
@@ -12078,6 +12081,7 @@ There are three types of features:
1. Features that are only supported when they have been enabled when Vim
was compiled |+feature-list|. Example: >
:if has("cindent")
+< *gui_running*
2. Features that are only supported when certain conditions have been met.
Example: >
:if has("gui_running")
diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt
index 75e967920f..a47fed1568 100644
--- a/runtime/doc/filetype.txt
+++ b/runtime/doc/filetype.txt
@@ -545,6 +545,14 @@ One command, :DiffGitCached, is provided to show a diff of the current commit
in the preview window. It is equivalent to calling "git diff --cached" plus
any arguments given to the command.
+GPROF
+
+The gprof filetype plugin defines a mapping <C-]> to jump from a function
+entry in the gprof flat profile or from a function entry in the call graph
+to the details of that function in the call graph.
+
+The mapping can be disabled with: >
+ let g:no_gprof_maps = 1
MAIL *ft-mail-plugin*
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
index 38687043b1..8da3a78afa 100644
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -1,4 +1,4 @@
-*map.txt* For Vim version 8.2. Last change: 2021 Aug 05
+*map.txt* For Vim version 8.2. Last change: 2021 Sep 12
VIM REFERENCE MANUAL by Bram Moolenaar
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 591e649d70..6bf0a5820c 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt* For Vim version 8.2. Last change: 2021 Sep 06
+*options.txt* For Vim version 8.2. Last change: 2021 Sep 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -4983,7 +4983,8 @@ A jump table for the options with a short description can be found at |Q_op|.
:set lcs=tab:>-,eol:<,nbsp:%
:set lcs=extends:>,precedes:<
< The "NonText" highlighting will be used for "eol", "extends" and
- "precedes". "SpecialKey" for "nbsp", "space", "tab" and "trail".
+ "precedes". "SpecialKey" will be used for "tab", "nbsp", "space",
+ "multispace", "lead" and "trail".
|hl-NonText| |hl-SpecialKey|
*'lpl'* *'nolpl'* *'loadplugins'* *'noloadplugins'*
@@ -8780,8 +8781,9 @@ A jump table for the options with a short description can be found at |Q_op|.
More info here: |cmdline-completion|.
The character is not recognized when used inside a macro. See
'wildcharm' for that.
+ Some keys will not work, such as CTRL-C, <CR> and Enter.
Although 'wc' is a number option, you can set it to a special key: >
- :set wc=<Esc>
+ :set wc=<Tab>
< NOTE: This option is set to the Vi default value when 'compatible' is
set and to the Vim default value when 'compatible' is reset.
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 63956e5952..eeada79e5a 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -3989,6 +3989,8 @@ E123 eval.txt /*E123*
E1231 map.txt /*E1231*
E1232 eval.txt /*E1232*
E1233 eval.txt /*E1233*
+E1237 map.txt /*E1237*
+E1239 eval.txt /*E1239*
E124 eval.txt /*E124*
E125 eval.txt /*E125*
E126 eval.txt /*E126*
@@ -5015,6 +5017,7 @@ Macintosh os_mac.txt /*Macintosh*
Mark motion.txt /*Mark*
MenuPopup autocmd.txt /*MenuPopup*
MiNT os_mint.txt /*MiNT*
+ModeChanged autocmd.txt /*ModeChanged*
Moolenaar intro.txt /*Moolenaar*
MorphOS os_amiga.txt /*MorphOS*
Motif gui_x11.txt /*Motif*
@@ -5553,10 +5556,12 @@ beval_winnr-variable eval.txt /*beval_winnr-variable*
binary-number eval.txt /*binary-number*
bitwise-function usr_41.txt /*bitwise-function*
blob eval.txt /*blob*
+blob-functions usr_41.txt /*blob-functions*
blob-identity eval.txt /*blob-identity*
blob-index eval.txt /*blob-index*
blob-literal eval.txt /*blob-literal*
blob-modification eval.txt /*blob-modification*
+blob2list() eval.txt /*blob2list()*
blockwise-examples visual.txt /*blockwise-examples*
blockwise-operators visual.txt /*blockwise-operators*
blockwise-register change.txt /*blockwise-register*
@@ -7200,6 +7205,7 @@ gui-x11-printing gui_x11.txt /*gui-x11-printing*
gui-x11-start gui_x11.txt /*gui-x11-start*
gui-x11-various gui_x11.txt /*gui-x11-various*
gui.txt gui.txt /*gui.txt*
+gui_running eval.txt /*gui_running*
gui_w32.txt gui_w32.txt /*gui_w32.txt*
gui_x11.txt gui_x11.txt /*gui_x11.txt*
guifontwide_gtk gui.txt /*guifontwide_gtk*
@@ -7701,6 +7707,7 @@ lcs-conceal options.txt /*lcs-conceal*
lcs-eol options.txt /*lcs-eol*
lcs-extends options.txt /*lcs-extends*
lcs-lead options.txt /*lcs-lead*
+lcs-multispace options.txt /*lcs-multispace*
lcs-nbsp options.txt /*lcs-nbsp*
lcs-precedes options.txt /*lcs-precedes*
lcs-space options.txt /*lcs-space*
@@ -7735,6 +7742,7 @@ list-identity eval.txt /*list-identity*
list-index eval.txt /*list-index*
list-modification eval.txt /*list-modification*
list-repeat windows.txt /*list-repeat*
+list2blob() eval.txt /*list2blob()*
list2str() eval.txt /*list2str()*
listener_add() eval.txt /*listener_add()*
listener_flush() eval.txt /*listener_flush()*
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index edcca49914..ffc5d1f88f 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 8.2. Last change: 2021 Sep 08
+*todo.txt* For Vim version 8.2. Last change: 2021 Sep 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -38,12 +38,14 @@ browser use: https://github.com/vim/vim/issues/1234
*known-bugs*
-------------------- Known bugs and current work -----------------------
-:delcommand -buffer should work
+Flaky test op Windows:
+From test_vim9_script.vim:
+ Found errors in Test_no_unknown_error_after_error():
+ command line..script D:/a/vim/vim/src2/testdir/runtest.vim[486]..function RunTheTest[44]..Test_no_unknown_error_after_error line 22: Expected 'E1012:' but got 'E684: list index out of range: 0': so Xdef
Vim9 - Make everything work:
-- Disallow using numbered function with "g:123" in Vim9 script? #8760
-- use CheckLegacyAndVim9Success(lines) in many more places
- Check TODO items in vim9compile.c and vim9execute.c
+- use CheckLegacyAndVim9Success(lines) in many more places
- For builtin functions using tv_get_string*() use check_for_string() to be
more strict about the argument type (not a bool).
done: balloon_()
@@ -366,10 +368,6 @@ autocommands for the buffer lifecycle:
BufIsRenamed (after buffer ID gets another name)
The buffer list and windows are locked, no changes possible
-Add a ModeChanged autocommand that has an argument indicating the old and new
-mode, as what's returned from mode(). Also used for switching Terminal mode.
-#8360, #7863, #7363
-
Matchparen doesn't remove highlight after undo. (#7054)
Is OK when syntax HL is active.
@@ -4845,7 +4843,6 @@ Autocommands:
command used dos fileformat. Same for 'fileencoding'.
- Add events to autocommands:
Error - When an error happens
- ModeChange - after changing mode (before waiting for a char)
VimLeaveCheck - Before Vim decides to exit, so that it can be cancelled
when exiting isn't a good idea.
CursorHoldC - CursorHold while command-line editing
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index 1e1a23d673..4ea51f986c 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: 2021 Aug 08
+*usr_41.txt* For Vim version 8.2. Last change: 2021 Sep 10
VIM USER MANUAL - by Bram Moolenaar
diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt
index a1d106d9bd..b6feebf84f 100644
--- a/runtime/doc/vim9.txt
+++ b/runtime/doc/vim9.txt
@@ -1,4 +1,4 @@
-*vim9.txt* For Vim version 8.2. Last change: 2021 Sep 08
+*vim9.txt* For Vim version 8.2. Last change: 2021 Sep 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -180,6 +180,15 @@ For now you will need to pass the dictionary explicitly: >
var d = {item: 'value', func: DictFunc}
d.func(d, 'item')
+You can call a legacy dict function though: >
+ func Legacy() dict
+ echo self.value
+ endfunc
+ def CallLegacy()
+ var d = {func: Legacy, value: 'text'}
+ d.func()
+ enddef
+
The argument types and return type need to be specified. The "any" type can
be used, type checking will then be done at runtime, like with legacy
functions.
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index f792803233..586b55f7ee 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2021 Aug 23
+" Last Change: 2021 Sep 21
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
diff --git a/runtime/ftplugin/8th.vim b/runtime/ftplugin/8th.vim
index 14301187d6..ad04f9ac84 100644
--- a/runtime/ftplugin/8th.vim
+++ b/runtime/ftplugin/8th.vim
@@ -1,9 +1,10 @@
" Vim ftplugin file
" Language: 8th
" Version: any
-" Last Change: 2015/11/08
+" Last Change: 2021 Sep 20
+" Last Change: 2021/09/20
" Maintainer: Ron Aaron <ron@aaron-tech.com>
-" URL: https://8th-dev.com/
+" URL: https://8th-dev.com/
" Filetypes: *.8th
" NOTE: 8th allows any non-whitespace in a name, so you need to do:
" setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255
@@ -14,12 +15,13 @@ if exists("b:did_8thplugin")
finish
endif
-" Don't load another plugin for this buffer
+" Don't load another 8th plugin for this buffer
let b:did_8thplugin = 1
setlocal ts=2 sts=2 sw=2 et
-setlocal com=s1:/*,mb:*,ex:*/,:\|,:\\
+setlocal com=s1:/*,mb:*,ex:*/,b:--,be:\\
setlocal fo=tcrqol
setlocal matchpairs+=\::;
setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255
setlocal suffixesadd=.8th
+let b:undo_ftplugin = "setlocal ts< sts< sw< et< com< fo< mps< isk< sua<"
diff --git a/runtime/ftplugin/c.vim b/runtime/ftplugin/c.vim
index 70e54b303a..b6aed9cb04 100644
--- a/runtime/ftplugin/c.vim
+++ b/runtime/ftplugin/c.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2020 Feb 01
+" Last Change: 2021 Sep 21
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -40,8 +40,11 @@ endif
" When the matchit plugin is loaded, this makes the % command skip parens and
" braces in comments properly.
-let b:match_words = '^\s*#\s*if\(\|def\|ndef\)\>:^\s*#\s*elif\>:^\s*#\s*else\>:^\s*#\s*endif\>'
-let b:match_skip = 's:comment\|string\|character\|special'
+if !exists("b:match_words")
+ let b:match_words = '^\s*#\s*if\(\|def\|ndef\)\>:^\s*#\s*elif\>:^\s*#\s*else\>:^\s*#\s*endif\>'
+ let b:match_skip = 's:comment\|string\|character\|special'
+ let b:undo_ftplugin ..= " | unlet! b:match_skip b:match_words"
+endif
" Win32 can filter files in the browse dialog
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
@@ -62,6 +65,7 @@ if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
\ "C++ Source Files (*.cpp *.c++)\t*.cpp;*.c++\n" .
\ "All Files (*.*)\t*.*\n"
endif
+ let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
let &cpo = s:cpo_save
diff --git a/runtime/ftplugin/gprof.vim b/runtime/ftplugin/gprof.vim
index d4547ae9a6..d8974bcc84 100644
--- a/runtime/ftplugin/gprof.vim
+++ b/runtime/ftplugin/gprof.vim
@@ -1,6 +1,7 @@
-" Language: gprof
-" Maintainer: Dominique Pelle <dominique.pelle@gmail.com>
-" Last Change: 2021 Apr 08
+" Language: gprof
+" Maintainer: Dominique Pelle <dominique.pelle@gmail.com>
+" Contributors: Doug Kearns <dougkearns@gmail.com>
+" Last Change: 2021 Sep 19
" When cursor is on one line of the gprof call graph,
" calling this function jumps to this function in the call graph.
@@ -9,7 +10,7 @@ if exists("b:did_ftplugin")
endif
let b:did_ftplugin=1
-fun! <SID>GprofJumpToFunctionIndex()
+func! <SID>GprofJumpToFunctionIndex()
let l:line = getline('.')
if l:line =~ '[\d\+\]$'
" We're in a line in the call graph.
@@ -22,11 +23,14 @@ fun! <SID>GprofJumpToFunctionIndex()
call search('^\[\d\+\].*\d\s\+' . escape(@", '[]*.') . '\>', 'sW')
norm! zz
endif
-endfun
+endfunc
-" Pressing <C-]> on a line in the gprof flat profile or in
-" the call graph, jumps to the corresponding function inside
-" the flat profile.
-map <buffer> <silent> <C-]> :call <SID>GprofJumpToFunctionIndex()<CR>
+if !exists("no_plugin_maps") && !exists("no_gprof_maps")
+ " Pressing <C-]> on a line in the gprof flat profile or in
+ " the call graph, jumps to the corresponding function inside
+ " the flat profile.
+ map <buffer> <silent> <C-]> :call <SID>GprofJumpToFunctionIndex()<CR>
+ let b:undo_ftplugin = "silent! unmap <buffer> <C-]>"
+endif
" vim:sw=2 fdm=indent
diff --git a/runtime/syntax/go.vim b/runtime/syntax/go.vim
index 1439487f69..0c326254b8 100644
--- a/runtime/syntax/go.vim
+++ b/runtime/syntax/go.vim
@@ -5,7 +5,7 @@
" go.vim: Vim syntax file for Go.
" Language: Go
" Maintainer: Billie Cleek <bhcleek@gmail.com>
-" Latest Revision: 2021-06-26
+" Latest Revision: 2021-09-18
" License: BSD-style. See LICENSE file in source repository.
" Repository: https://github.com/fatih/vim-go
@@ -250,7 +250,7 @@ syn match goDecimalError "\<-\=\(_\(\d\+_*\)\+\|\([1-9]\d*_*\)\+__\(\
syn match goHexadecimalInt "\<-\=0[xX]_\?\(\x\+_\?\)\+\>"
syn match goHexadecimalError "\<-\=0[xX]_\?\(\x\+_\?\)*\(\([^ \t0-9A-Fa-f_)]\|__\)\S*\|_\)\>"
syn match goOctalInt "\<-\=0[oO]\?_\?\(\o\+_\?\)\+\>"
-syn match goOctalError "\<-\=0[0-7oO_]*\(\([^ \t0-7oOxX_/)\]\}\:]\|[oO]\{2,\}\|__\)\S*\|_\|[oOxX]\)\>"
+syn match goOctalError "\<-\=0[0-7oO_]*\(\([^ \t0-7oOxX_/)\]\}\:;]\|[oO]\{2,\}\|__\)\S*\|_\|[oOxX]\)\>"
syn match goBinaryInt "\<-\=0[bB]_\?\([01]\+_\?\)\+\>"
syn match goBinaryError "\<-\=0[bB]_\?[01_]*\([^ \t01_)]\S*\|__\S*\|_\)\>"
@@ -430,7 +430,7 @@ endif
" Build Constraints
if s:HighlightBuildConstraints()
- syn match goBuildKeyword display contained "+build"
+ syn match goBuildKeyword display contained "+build\|go:build"
" Highlight the known values of GOOS, GOARCH, and other +build options.
syn keyword goBuildDirectives contained
\ android darwin dragonfly freebsd linux nacl netbsd openbsd plan9
diff --git a/runtime/syntax/gprof.vim b/runtime/syntax/gprof.vim
index 880452a84b..d2c5cb4cab 100644
--- a/runtime/syntax/gprof.vim
+++ b/runtime/syntax/gprof.vim
@@ -1,15 +1,16 @@
" Vim syntax file
" Language: Syntax for Gprof Output
" Maintainer: Dominique Pelle <dominique.pelle@gmail.com>
-" Last Change: 2021 Apr 08
+" Last Change: 2021 Sep 19
" Quit when a syntax file was already loaded
if exists("b:current_syntax")
- finish
+ finish
endif
let s:keepcpo= &cpo
set cpo&vim
+syn spell notoplevel
syn case match
syn sync minlines=100
diff --git a/runtime/syntax/php.vim b/runtime/syntax/php.vim
index 7b0085cd6e..80662d6750 100644
--- a/runtime/syntax/php.vim
+++ b/runtime/syntax/php.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: php PHP 3/4/5/7/8
" Maintainer: Tyson Andre <tysonandre775@hotmail.com>
-" Last Change: Dec 22, 2020
+" Last Change: Sep 18, 2021
" URL: https://github.com/TysonAndre/php-vim-syntax
" Former Maintainers:
" Jason Woofenden <jason@jasonwoof.com>
@@ -13,10 +13,32 @@
" than the default colourscheme, because elflord's colours will better
" highlight the break-points (Statements) in your code.
"
+" Note: This embeds a modified copy of the html.vim with (mostly) different symbols,
+" in order to implement php_htmlInStrings=2 can work as expected and correctly parse
+" `<?php $phpStartTag = '<?php';`.
+"
+" Credits for the original version of html.vim prior to modifications
+"
+" Previous Maintainer Jorge Maldonado Ventura <jorgesumle@freakspot.net>
+" Previous Maintainer Claudio Fleiner <claudio@fleiner.com>
+" Repository https://notabug.org/jorgesumle/vim-html-syntax
+" Last Change 2021 Mar 02
+" Included patch #7900 to fix comments
+" Included patch #7916 to fix a few more things
+"
" Options:
" Set to anything to enable:
" php_sql_query SQL syntax highlighting inside strings
" php_htmlInStrings HTML syntax highlighting inside strings
+"
+" By setting this to 2, this will use a local copy of
+" HTML syntax highlighting instead of the official
+" HTML syntax highlighting, and properly highlight
+" `<?php $startTag = '<?php';`.
+" This may become the new default in the future.
+"
+" By setting this to 3 (or any unrecognized value),
+" this will use the official installed top level html syntax highlighting rules.
" php_baselib highlighting baselib functions
" php_asp_tags highlighting ASP-style short tags
" php_parent_error_close highlighting parent error ] or )
@@ -62,6 +84,214 @@ if !exists("main_syntax")
let main_syntax = 'php'
endif
+" Start of copy of html for embedding in strings with {{{
+" This is a clone of https://notabug.org/jorgesumle/vim-html-syntax
+" from 2021 Mar 02 with changed symbols and modifications to rules. See the Note in the file header.
+"
+" The default behavior of php_htmlInStrings causes a bug
+" when you're working with code that contains the string literal `'<?php'`.
+" E.g. code that reads php files or generates the contents of php files or
+" generates snippets to `eval()`.
+"
+" When php_htmlInStrings was set to any value,
+" it would cause the html syntax rules to be embedded inside of the string
+" contents.
+"
+" However, php.vim extends html.vim by allowing the php start tag to be
+" included, meaning that this is parsed as `<?php';`, i.e. the start of a
+" new string literal.
+"
+" Work around that by using a different set of rules that don't allow
+" embedding php in most places (phpInnerHtmlPreProc).
+"
+" The default behavior may be changed to this in the future for constants other
+" than 2 or 3 if there are no issues.
+"
+" Many, but not all syntax rules were changed from html* to phpInnerHtml*
+if exists("php_htmlInStrings") && php_htmlInStrings==2
+ " mark illegal characters
+ syn match phpInnerHtmlError contained "[<>&]"
+
+ " tags
+ syn region phpInnerHtmlString contained start=+"+ end=+"+ contains=phpInnerHtmlSpecialChar,javaScriptExpression,@phpInnerHtmlPreproc
+ syn region phpInnerHtmlString contained start=+'+ end=+'+ contains=phpInnerHtmlSpecialChar,javaScriptExpression,@phpInnerHtmlPreproc
+ syn match phpInnerHtmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@phpInnerHtmlPreproc
+ syn region phpInnerHtmlEndTag contained start=+</+ end=+>+ contains=phpInnerHtmlTagN,phpInnerHtmlTagError
+ syn region phpInnerHtmlTag contained start=+<[^/]+ end=+>+ fold contains=phpInnerHtmlTagN,phpInnerHtmlString,htmlArg,phpInnerHtmlValue,phpInnerHtmlTagError,phpInnerHtmlEvent,phpInnerHtmlCssDefinition,@phpInnerHtmlPreproc,@phpInnerHtmlArgCluster
+ syn match phpInnerHtmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@phpInnerHtmlTagNameCluster
+ syn match phpInnerHtmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,@phpInnerHtmlTagNameCluster
+ syn match phpInnerHtmlTagError contained "[^>]<"ms=s+1
+
+
+ " special characters
+ syn match phpInnerHtmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};"
+
+ " Comments (the real ones or the old netscape ones)
+ if exists("html_wrong_comments")
+ syn region phpInnerHtmlComment start=+<!--+ end=+--\s*>+ contains=@Spell
+ else
+ " The HTML 5.2 syntax 8.2.4.41: bogus comment is parser error; browser skips until next &gt
+ syn region phpInnerHtmlComment start=+<!+ end=+>+ contains=phpInnerHtmlCommentError keepend
+ " Idem 8.2.4.42,51: Comment starts with <!-- and ends with -->
+ " Idem 8.2.4.43,44: Except <!--> and <!---> are parser errors
+ " Idem 8.2.4.52: dash-dash-bang (--!>) is error ignored by parser, also closes comment
+ syn region phpInnerHtmlComment matchgroup=phpInnerHtmlComment start=+<!--\%(-\?>\)\@!+ end=+--!\?>+ contains=phpInnerHtmlCommentNested,@phpInnerHtmlPreProc,@Spell keepend
+ " Idem 8.2.4.49: nested comment is parser error, except <!--> is all right
+ syn match phpInnerHtmlCommentNested contained "<!-->\@!"
+ syn match phpInnerHtmlCommentError contained "[^><!]"
+ endif
+ syn region phpInnerHtmlComment start=+<!DOCTYPE+ end=+>+ keepend
+
+ " server-parsed commands
+ syn region phpInnerHtmlPreProc start=+<!--#+ end=+-->+ contains=phpInnerHtmlPreStmt,phpInnerHtmlPreError,phpInnerHtmlPreAttr
+ syn match phpInnerHtmlPreStmt contained "<!--#\(config\|echo\|exec\|fsize\|flastmod\|include\|printenv\|set\|if\|elif\|else\|endif\|geoguide\)\>"
+ syn match phpInnerHtmlPreError contained "<!--#\S*"ms=s+4
+ syn match phpInnerHtmlPreAttr contained "\w\+=[^"]\S\+" contains=phpInnerHtmlPreProcAttrError,phpInnerHtmlPreProcAttrName
+ syn region phpInnerHtmlPreAttr contained start=+\w\+="+ skip=+\\\\\|\\"+ end=+"+ contains=phpInnerHtmlPreProcAttrName keepend
+ syn match phpInnerHtmlPreProcAttrError contained "\w\+="he=e-1
+ syn match phpInnerHtmlPreProcAttrName contained "\(expr\|errmsg\|sizefmt\|timefmt\|var\|cgi\|cmd\|file\|virtual\|value\)="he=e-1
+
+ if !exists("html_no_rendering")
+ " rendering
+ syn cluster phpInnerHtmlTop contains=@Spell,phpInnerHtmlTag,phpInnerHtmlEndTag,phpInnerHtmlSpecialChar,phpInnerHtmlPreProc,phpInnerHtmlComment,phpInnerHtmlLink,javaScript,@phpInnerHtmlPreproc
+
+ syn region phpInnerHtmlStrike start="<del\>" end="</del\_s*>"me=s-1 contains=@phpInnerHtmlTop
+ syn region phpInnerHtmlStrike start="<strike\>" end="</strike\_s*>"me=s-1 contains=@phpInnerHtmlTop
+
+ syn region phpInnerHtmlBold start="<b\>" end="</b\_s*>"me=s-1 contains=@phpInnerHtmlTop,phpInnerHtmlBoldUnderline,phpInnerHtmlBoldItalic
+ syn region phpInnerHtmlBold start="<strong\>" end="</strong\_s*>"me=s-1 contains=@phpInnerHtmlTop,phpInnerHtmlBoldUnderline,phpInnerHtmlBoldItalic
+ syn region phpInnerHtmlBoldUnderline contained start="<u\>" end="</u\_s*>"me=s-1 contains=@phpInnerHtmlTop,phpInnerHtmlBoldUnderlineItalic
+ syn region phpInnerHtmlBoldItalic contained start="<i\>" end="</i\_s*>"me=s-1 contains=@phpInnerHtmlTop,phpInnerHtmlBoldItalicUnderline
+ syn region phpInnerHtmlBoldItalic contained start="<em\>" end="</em\_s*>"me=s-1 contains=@phpInnerHtmlTop,phpInnerHtmlBoldItalicUnderline
+ syn region phpInnerHtmlBoldUnderlineItalic contained start="<i\>" end="</i\_s*>"me=s-1 contains=@phpInnerHtmlTop
+ syn region phpInnerHtmlBoldUnderlineItalic contained start="<em\>" end="</em\_s*>"me=s-1 contains=@phpInnerHtmlTop
+ syn region phpInnerHtmlBoldItalicUnderline contained start="<u\>" end="</u\_s*>"me=s-1 contains=@phpInnerHtmlTop,phpInnerHtmlBoldUnderlineItalic
+
+ syn region phpInnerHtmlUnderline start="<u\>" end="</u\_s*>"me=s-1 contains=@phpInnerHtmlTop,phpInnerHtmlUnderlineBold,phpInnerHtmlUnderlineItalic
+ syn region phpInnerHtmlUnderlineBold contained start="<b\>" end="</b\_s*>"me=s-1 contains=@phpInnerHtmlTop,phpInnerHtmlUnderlineBoldItalic
+ syn region phpInnerHtmlUnderlineBold contained start="<strong\>" end="</strong\_s*>"me=s-1 contains=@phpInnerHtmlTop,phpInnerHtmlUnderlineBoldItalic
+ syn region phpInnerHtmlUnderlineItalic contained start="<i\>" end="</i\_s*>"me=s-1 contains=@phpInnerHtmlTop,phpInnerHtmlUnderlineItalicBold
+ syn region phpInnerHtmlUnderlineItalic contained start="<em\>" end="</em\_s*>"me=s-1 contains=@phpInnerHtmlTop,phpInnerHtmlUnderlineItalicBold
+ syn region phpInnerHtmlUnderlineItalicBold contained start="<b\>" end="</b\_s*>"me=s-1 contains=@phpInnerHtmlTop
+ syn region phpInnerHtmlUnderlineItalicBold contained start="<strong\>" end="</strong\_s*>"me=s-1 contains=@phpInnerHtmlTop
+ syn region phpInnerHtmlUnderlineBoldItalic contained start="<i\>" end="</i\_s*>"me=s-1 contains=@phpInnerHtmlTop
+ syn region phpInnerHtmlUnderlineBoldItalic contained start="<em\>" end="</em\_s*>"me=s-1 contains=@phpInnerHtmlTop
+
+ syn region phpInnerHtmlItalic start="<i\>" end="</i\_s*>"me=s-1 contains=@phpInnerHtmlTop,phpInnerHtmlItalicBold,phpInnerHtmlItalicUnderline
+ syn region phpInnerHtmlItalic start="<em\>" end="</em\_s*>"me=s-1 contains=@phpInnerHtmlTop
+ syn region phpInnerHtmlItalicBold contained start="<b\>" end="</b\_s*>"me=s-1 contains=@phpInnerHtmlTop,phpInnerHtmlItalicBoldUnderline
+ syn region phpInnerHtmlItalicBold contained start="<strong\>" end="</strong\_s*>"me=s-1 contains=@phpInnerHtmlTop,phpInnerHtmlItalicBoldUnderline
+ syn region phpInnerHtmlItalicBoldUnderline contained start="<u\>" end="</u\_s*>"me=s-1 contains=@phpInnerHtmlTop
+ syn region phpInnerHtmlItalicUnderline contained start="<u\>" end="</u\_s*>"me=s-1 contains=@phpInnerHtmlTop,phpInnerHtmlItalicUnderlineBold
+ syn region phpInnerHtmlItalicUnderlineBold contained start="<b\>" end="</b\_s*>"me=s-1 contains=@phpInnerHtmlTop
+ syn region phpInnerHtmlItalicUnderlineBold contained start="<strong\>" end="</strong\_s*>"me=s-1 contains=@phpInnerHtmlTop
+
+ syn match phpInnerHtmlLeadingSpace "^\s\+" contained
+ syn region phpInnerHtmlLink start="<a\>\_[^>]*\<href\>" end="</a\_s*>"me=s-1 contains=@Spell,phpInnerHtmlTag,phpInnerHtmlEndTag,phpInnerHtmlSpecialChar,phpInnerHtmlPreProc,phpInnerHtmlComment,phpInnerHtmlLeadingSpace,phpInnerJavaScript,@phpInnerHtmlPreproc
+ syn region phpInnerHtmlH1 start="<h1\>" end="</h1\_s*>"me=s-1 contains=@phpInnerHtmlTop
+ syn region phpInnerHtmlH2 start="<h2\>" end="</h2\_s*>"me=s-1 contains=@phpInnerHtmlTop
+ syn region phpInnerHtmlH3 start="<h3\>" end="</h3\_s*>"me=s-1 contains=@phpInnerHtmlTop
+ syn region phpInnerHtmlH4 start="<h4\>" end="</h4\_s*>"me=s-1 contains=@phpInnerHtmlTop
+ syn region phpInnerHtmlH5 start="<h5\>" end="</h5\_s*>"me=s-1 contains=@phpInnerHtmlTop
+ syn region phpInnerHtmlH6 start="<h6\>" end="</h6\_s*>"me=s-1 contains=@phpInnerHtmlTop
+ syn region phpInnerHtmlHead start="<head\>" end="</head\_s*>"me=s-1 end="<body\>"me=s-1 end="<h[1-6]\>"me=s-1 contains=phpInnerHtmlTag,phpInnerHtmlEndTag,phpInnerHtmlSpecialChar,phpInnerHtmlPreProc,phpInnerHtmlComment,phpInnerHtmlLink,phpInnerHtmlTitle,phpInnerJavaScript,phpInnerCssStyle,@phpInnerHtmlPreproc
+ syn region phpInnerHtmlTitle start="<title\>" end="</title\_s*>"me=s-1 contains=phpInnerHtmlTag,phpInnerHtmlEndTag,phpInnerHtmlSpecialChar,phpInnerHtmlPreProc,phpInnerHtmlComment,phpInnerJavaScript,@phpInnerHtmlPreproc
+ endif
<