diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-05-12 22:49:12 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-05-12 22:49:12 +0200 |
commit | 47e13953ffdbb9f163b901196dec8c2100b72edd (patch) | |
tree | cc2251dbffe417d931b2c234f686e58d5c61f9d8 /runtime | |
parent | 9e6ba8cbef2b2363f1d0a0e2c2a8d21c3b987416 (diff) |
Update runtime files
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/editing.txt | 43 | ||||
-rw-r--r-- | runtime/doc/index.txt | 8 | ||||
-rw-r--r-- | runtime/doc/popup.txt | 3 | ||||
-rw-r--r-- | runtime/doc/recover.txt | 14 | ||||
-rw-r--r-- | runtime/doc/tags | 1 | ||||
-rw-r--r-- | runtime/doc/todo.txt | 48 | ||||
-rw-r--r-- | runtime/doc/vim9.txt | 29 | ||||
-rw-r--r-- | runtime/doc/windows.txt | 19 | ||||
-rw-r--r-- | runtime/ftplugin/masm.vim | 19 | ||||
-rw-r--r-- | runtime/indent/python.vim | 24 | ||||
-rw-r--r-- | runtime/plugin/gzip.vim | 6 | ||||
-rw-r--r-- | runtime/syntax/gnuplot.vim | 4 | ||||
-rw-r--r-- | runtime/syntax/masm.vim | 4 | ||||
-rw-r--r-- | runtime/syntax/pamenv.vim | 28 | ||||
-rw-r--r-- | runtime/syntax/php.vim | 25 | ||||
-rw-r--r-- | runtime/syntax/sh.vim | 21 |
16 files changed, 191 insertions, 105 deletions
diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index 96bcb9340d..f6e3810d88 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -1,4 +1,4 @@ -*editing.txt* For Vim version 8.2. Last change: 2019 Dec 22 +*editing.txt* For Vim version 8.2. Last change: 2020 May 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -475,6 +475,9 @@ This edits the same file again with 'fileformat' set to "unix". > :w ++enc=latin1 newfile This writes the current buffer to "newfile" in latin1 format. +The message given when writing a file will show "[converted]" when +'fileencoding' or the value specified with ++enc differs from 'encoding'. + There may be several ++opt arguments, separated by white space. They must all appear before any |+cmd| argument. @@ -1079,9 +1082,9 @@ The names can be in upper- or lowercase. *:q* *:quit* :q[uit] Quit the current window. Quit Vim if this is the last - window. This fails when changes have been made and - Vim refuses to |abandon| the current buffer, and when - the last file in the argument list has not been + |edit-window|. This fails when changes have been made + and Vim refuses to |abandon| the current buffer, and + when the last file in the argument list has not been edited. If there are other tab pages and quitting the last window in the current tab page the current tab page is @@ -1107,18 +1110,22 @@ The names can be in upper- or lowercase. |quickfix|). *:wq* -:wq [++opt] Write the current file and quit. Writing fails when - the file is read-only or the buffer does not have a - name. Quitting fails when the last file in the - argument list has not been edited. - -:wq! [++opt] Write the current file and quit. Writing fails when - the current buffer does not have a name. - -:wq [++opt] {file} Write to {file} and quit. Quitting fails when the +:wq [++opt] Write the current file and close the window. If this + was the last |edit-window| Vim quits. + Writing fails when the file is read-only or the buffer + does not have a name. Quitting fails when the last + file in the argument list has not been edited. + +:wq! [++opt] Write the current file and close the window. If this + was the last |edit-window| Vim quits. Writing fails + when the current buffer does not have a name. + +:wq [++opt] {file} Write to {file} and close the window. If this was the + last |edit-window| Vim quits. Quitting fails when the last file in the argument list has not been edited. -:wq! [++opt] {file} Write to {file} and quit. +:wq! [++opt] {file} Write to {file} and close the current window. Quit + Vim if this was the last |edit-window|. :[range]wq[!] [++opt] [file] Same as above, but only write the lines in [range]. @@ -1135,10 +1142,10 @@ The names can be in upper- or lowercase. Same as :xit. *ZZ* -ZZ Write current file, if modified, and quit (same as - ":x"). (Note: If there are several windows for the - current file, the file is written if it was modified - and the window is closed). +ZZ Write current file, if modified, and close the current + window (same as ":x"). + If there are several windows for the current file, + only the current window is closed. *ZQ* ZQ Quit without checking for changes (same as ":q!"). diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index 315a5f3326..78d557f51e 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -1,4 +1,4 @@ -*index.txt* For Vim version 8.2. Last change: 2020 Apr 26 +*index.txt* For Vim version 8.2. Last change: 2020 May 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -364,8 +364,8 @@ tag char note action in Normal mode ~ register x] |Y| ["x]Y yank N lines [into register x]; synonym for "yy" -|ZZ| ZZ store current file if modified, and exit -|ZQ| ZQ exit current file always +|ZZ| ZZ write if buffer changed and close window +|ZQ| ZQ close window without writing |[| [{char} square bracket command (see |[| below) \ not used |]| ]{char} square bracket command (see |]| below) @@ -1721,7 +1721,7 @@ tag command action ~ |:wqall| :wqa[ll] write all changed buffers and quit Vim |:wundo| :wu[ndo] write undo information to a file |:wviminfo| :wv[iminfo] write to viminfo file -|:xit| :x[it] write if buffer changed and quit window or Vim +|:xit| :x[it] write if buffer changed and close window |:xall| :xa[ll] same as ":wqall" |:xmapclear| :xmapc[lear] remove all mappings for Visual mode |:xmap| :xm[ap] like ":map" but for Visual mode diff --git a/runtime/doc/popup.txt b/runtime/doc/popup.txt index 26435d1ff0..9041f87540 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 Apr 13 +*popup.txt* For Vim version 8.2. Last change: 2020 May 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -150,6 +150,7 @@ different: *E863* - When the job ends, the popup window closes. - The popup window can be closed with `popup_close()`, the terminal buffer then becomes hidden. +- It is not possible to enter Terminal-Normal mode. - The default Pmenu color is only used for the border and padding. To change the color of the terminal itself set the Terminal highlight group before creating the terminal. Setting 'wincolor' later can work but requires the diff --git a/runtime/doc/recover.txt b/runtime/doc/recover.txt index 0bab64a295..34f7f18451 100644 --- a/runtime/doc/recover.txt +++ b/runtime/doc/recover.txt @@ -1,4 +1,4 @@ -*recover.txt* For Vim version 8.2. Last change: 2020 Mar 24 +*recover.txt* For Vim version 8.2. Last change: 2020 May 09 VIM REFERENCE MANUAL by Bram Moolenaar @@ -125,12 +125,12 @@ If you want to make sure that your changes are in the swap file use this command: *:pre* *:preserve* *E313* *E314* -:pre[serve] Write all text for all buffers into swap files. The - original file is no longer needed for recovery. - This sets a flag in the current buffer. When the '&' - flag is present in 'cpoptions' the swap file will not - be deleted for this buffer when Vim exits and the - buffer is still loaded |cpo-&|. +:pre[serve] Write all text for the current buffer into its swap + file. The original file is no longer needed for + recovery. This sets a flag in the current buffer. + When the '&' flag is present in 'cpoptions' the swap + file will not be deleted for this buffer when Vim + exits and the buffer is still loaded |cpo-&|. A Vim swap file can be recognized by the first six characters: "b0VIM ". After that comes the version number, e.g., "3.0". diff --git a/runtime/doc/tags b/runtime/doc/tags index e8d7d25a39..18e88f5708 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -6127,6 +6127,7 @@ edit-files editing.txt /*edit-files* edit-intro editing.txt /*edit-intro* edit-no-break usr_25.txt /*edit-no-break* edit-paragraph-join usr_25.txt /*edit-paragraph-join* +edit-window windows.txt /*edit-window* editing.txt editing.txt /*editing.txt* efm-%> quickfix.txt /*efm-%>* efm-entries quickfix.txt /*efm-entries* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 7bc39456d9..acc55fe337 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 May 07 +*todo.txt* For Vim version 8.2. Last change: 2020 May 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -38,23 +38,22 @@ browser use: https://github.com/vim/vim/issues/1234 *known-bugs* -------------------- Known bugs and current work ----------------------- +Patch to test TERM signal. (Dominique, #6055) + +Include src/po/vim.pot + Vim9 script: -Big changes, may need design: -- Make closures work: +Make closures work: - call closure from not compiled context - Create closure in a loop. Need to make a list of them. -- Having constant expr evaluation separate does not scale. - First parse the expression, then simplify, then generate code. -- At the vim9 script level: Allow using a function that is defined later. - Requires compiling functions only when the whole script has been sourced. - Like Javascript "hoisting", but only at the script level: - 0. If script was sourced before, clear all script-local functions and - variables. (variables still to be implemented) - 1. Discovery phase: Read the file to find all functions, variable - declarations and imports If a variable has a constant expression we get - the type, otherwise it will be "any". Follow imports recursively. - 2. Compilation phase: compile :def function bodies, using declared types - 3. Execution phase: Execute imports when encountered. (skip over functions) +Forward declarations: + - Cleanup when sourcing a script again: all script-local variables, imports + and functions are deleted. + - make sure only constants in declarations are executed, no function calls. + - Declare a variable at script level without an assignment. + let var: string + Error without a type or assignment + let var # error! Making everything work: - Test that a script-local function in Vim9 script cannot be deleted. - Test that a function defined inside a :def function is local to that @@ -62,7 +61,13 @@ Making everything work: defined. - Check that when using a user function name without prefix, it does not find a global function. Prefixing g: is required. -- Compile let [var, var] = expr +- Compile: let [var, var] = expr +- 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 - Compile replacement of :s command: s/pat/\=expr/ - Compile redir to local variable: var_redir_start(). - Compile builtin functions that access local variables: @@ -79,6 +84,7 @@ 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() +- Make "true" and "false" work in vim9script New syntax and functionality: Improve error checking: - "echo Func()" is an error if Func() does not return anything. @@ -254,14 +260,14 @@ Patch for the Haiku port: #5961 Patch to add Turkish manual. (Emir Sarı, #5641) +Patch to add lua sleep function. (Prabir Shrestha, #6057) +Alternative: use vim.call and vim.fn: #6063 + Patch to add getmarklist() (Yegappan, #6032) Patch to support different color for undercurl in cterm. (Timur Celik, #6011) -When SIGTSTP is ignored, don't let CTRL-Z suspend Vim? (Kurtis Rader, #5990) -Fixed by patch #6026. Makes tests fail... - Patch to support cindent option to handle pragmas differently. (Max Rumpf, #5468) @@ -294,6 +300,10 @@ Patch to delete BeOS code. (#5817) Anyone who wants to keep it? With bash ":make" does not set v:shell_error. Possible solution: set 'shellpipe' to "2>&1| tee %s; exit ${PIPESTATUS[0]}" #5994 +When changing the crypt key the buffer should be considered modified. +Like when changing 'fileformat'. Save the old key in save_file_ff(). +(Ninu-Ciprian Marginean) + Strange sequence of BufWipeout and BufNew events while doing omni-complete. (Paul Jolly, #5656) Get BufDelete without preceding BufNew. (Paul Jolly, #5694) diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt index cb880c18f5..3eec280364 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 May 06 +*vim9.txt* For Vim version 8.2. Last change: 2020 May 09 VIM REFERENCE MANUAL by Bram Moolenaar @@ -134,7 +134,7 @@ Four phases when loading a Vim9 script ~ In legacy script the functions are created when encountered, but parsed only when used. This allows for defining functions in any order and having them -call each other: > +call each other, so long as the function is defined when it is called: > func One() call Two() endfunc @@ -145,22 +145,25 @@ call each other: > endfunc call One() -In Vim9 script the functions are compiled. If using the same functions as the -above example it is not possible to compile function One without knowing that -function Two exists. Or this would require a runtime check, which is slow and -does not allow for compile time type checking. +In Vim9 script the functions are compiled. When using the same functions as +the above example it is not possible to compile function One without knowing +that function Two exists. Or this would require a runtime check, which is slow +and does not allow for compile time type checking. When sourcing a Vim9 script this happens in four phases: 1. Cleanup: If the script was sourced before all script-local variables, imports and functions are deleted. -2. Discovery: The script is read and encountered functions, imports and - variables are recognized. The type is parsed. Variable initializers that - are a constant are evaluated, this can give the type of the variable. +2. Discovery: The script is read and declarations of functions, imports and + variables are recognized and the type is parsed. Variable initializers + that are a constant are evaluated, this can also give the type of the + variable. 3. Compilation: Functions are compiled. The script-local functions, imports - and variables from the discovery phase are recognized and types are - checked. -4. Execution: the commands in the script are executed. Functions are skipped - over. Variable initializers are evaluated, unless they are a constant. + and variables from the discovery phase are found and types are checked. +4. Execution: the commands in the script are executed, top to bottom. + Functions are skipped over, they do do not need to be processed again. + Variable initializers are evaluated when encountered. Note that if a + function called earlier has set the value this will be over-written. It is + best to declare variables before where they are used to avoid confusion. The result is that items defined at the script level can be used anywhere in the script. This allows for putting the main function at the top: > diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt index 6129b8d13b..2b01fb359d 100644 --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -1,4 +1,4 @@ -*windows.txt* For Vim version 8.2. Last change: 2020 Mar 19 +*windows.txt* For Vim version 8.2. Last change: 2020 May 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -291,9 +291,9 @@ CTRL-W q *CTRL-W_q* CTRL-W CTRL-Q *CTRL-W_CTRL-Q* Without {count}: Quit the current window. If {count} is given quit the {count} window. - - When quitting the last window (not counting a help window), - exit Vim. + *edit-window* + When quitting the last edit window (not counting help or + preview windows), exit Vim. When 'hidden' is set, and there is only one window for the current buffer, it becomes hidden. When 'hidden' is not set, @@ -312,8 +312,9 @@ CTRL-W CTRL-Q *CTRL-W_CTRL-Q* :+quit " quit the next window :+2quit " quit the second next window < - When closing a help window, Vim will try to restore the - previous window layout |:helpclose|. + When closing a help window, and this is not the only window, + Vim will try to restore the previous window layout, see + |:helpclose|. :q[uit]! :{count}q[uit]! @@ -335,9 +336,9 @@ CTRL-W c *CTRL-W_c* *:clo* *:close* changed and the [!] is used, the buffer becomes hidden (unless there is another window editing it). - When there is only one window in the current tab page and - there is another tab page, this closes the current tab page. - |tab-page|. + When there is only one |edit-window| in the current tab page + and there is another tab page, this closes the current tab + page. |tab-page|. This command fails when: *E444* - There is only one window on the screen. diff --git a/runtime/ftplugin/masm.vim b/runtime/ftplugin/masm.vim new file mode 100644 index 0000000000..235469ac32 --- /dev/null +++ b/runtime/ftplugin/masm.vim @@ -0,0 +1,19 @@ +" Vim filetype plugin file +" Language: Microsoft Macro Assembler (80x86) +" Maintainer: Wu Yongwei <wuyongwei@gmail.com> +" Last Change: 2020-05-09 23:02:05 +0800 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl iskeyword<" + +setlocal iskeyword=@,48-57,_,36,60,62,63,@-@ + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/indent/python.vim b/runtime/indent/python.vim index e53987a0de..f9236e63c7 100644 --- a/runtime/indent/python.vim +++ b/runtime/indent/python.vim @@ -28,6 +28,11 @@ set cpo&vim let s:maxoff = 50 " maximum number of lines to look backwards for () +" See if the specified line is already user-dedented from the expected value. +function s:Dedented(lnum, expected) + return indent(a:lnum) <= a:expected - shiftwidth() +endfunction + function GetPythonIndent(lnum) " If this line is explicitly joined: If the previous line was also joined, @@ -158,12 +163,12 @@ function GetPythonIndent(lnum) " If the previous line was a stop-execution statement... if getline(plnum) =~ '^\s*\(break\|continue\|raise\|return\|pass\)\>' " See if the user has already dedented - if indent(a:lnum) > indent(plnum) - shiftwidth() - " If not, recommend one dedent - return indent(plnum) - shiftwidth() + if s:Dedented(a:lnum, indent(plnum)) + " If so, trust the user + return -1 endif - " Otherwise, trust the user - return -1 + " If not, recommend one dedent + return indent(plnum) - shiftwidth() endif " If the current line begins with a keyword that lines up with "try" @@ -191,7 +196,7 @@ function GetPythonIndent(lnum) endif " Or the user has already dedented - if indent(a:lnum) <= plindent - shiftwidth() + if s:Dedented(a:lnum, plindent) return -1 endif @@ -203,7 +208,12 @@ function GetPythonIndent(lnum) " + c) " here if parlnum > 0 - return plindent + " ...unless the user has already dedented + if s:Dedented(a:lnum, plindent) + return -1 + else + return plindent + endif endif return -1 diff --git a/runtime/plugin/gzip.vim b/runtime/plugin/gzip.vim index ffc00f6fd6..7214488579 100644 --- a/runtime/plugin/gzip.vim +++ b/runtime/plugin/gzip.vim @@ -20,7 +20,7 @@ augroup gzip " " Set binary mode before reading the file. " Use "gzip -d", gunzip isn't always available. - autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma,*.xz,*.lz,*.zst,*.br setlocal bin + autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma,*.xz,*.lz,*.zst,*.br,*.lzo setlocal bin autocmd BufReadPost,FileReadPost *.gz call gzip#read("gzip -dn") autocmd BufReadPost,FileReadPost *.bz2 call gzip#read("bzip2 -d") autocmd BufReadPost,FileReadPost *.Z call gzip#read("uncompress") @@ -29,6 +29,7 @@ augroup gzip autocmd BufReadPost,FileReadPost *.lz call gzip#read("lzip -d") autocmd BufReadPost,FileReadPost *.zst call gzip#read("zstd -d --rm") autocmd BufReadPost,FileReadPost *.br call gzip#read("brotli -d --rm") + autocmd BufReadPost,FileReadPost *.lzo call gzip#read("lzop -d -U") autocmd BufWritePost,FileWritePost *.gz call gzip#write("gzip") autocmd BufWritePost,FileWritePost *.bz2 call gzip#write("bzip2") autocmd BufWritePost,FileWritePost *.Z call gzip#write("compress -f") @@ -37,6 +38,7 @@ augroup gzip autocmd BufWritePost,FileWritePost *.lz call gzip#write("lzip") autocmd BufWritePost,FileWritePost *.zst call gzip#write("zstd --rm") autocmd BufWritePost,FileWritePost *.br call gzip#write("brotli --rm") + autocmd BufWritePost,FileWritePost *.lzo call gzip#write("lzop -U") autocmd FileAppendPre *.gz call gzip#appre("gzip -dn") autocmd FileAppendPre *.bz2 call gzip#appre("bzip2 -d") autocmd FileAppendPre *.Z call gzip#appre("uncompress") @@ -45,6 +47,7 @@ augroup gzip autocmd FileAppendPre *.lz call gzip#appre("lzip -d") autocmd FileAppendPre *.zst call gzip#appre("zstd -d --rm") autocmd FileAppendPre *.br call gzip#appre("brotli -d --rm") + autocmd FileAppendPre *.lzo call gzip#appre("lzop -d -U") autocmd FileAppendPost *.gz call gzip#write("gzip") autocmd FileAppendPost *.bz2 call gzip#write("bzip2") autocmd FileAppendPost *.Z call gzip#write("compress -f") @@ -53,4 +56,5 @@ augroup gzip autocmd FileAppendPost *.lz call gzip#write("lzip") autocmd FileAppendPost *.zst call gzip#write("zstd --rm") autocmd FileAppendPost *.br call gzip#write("brotli --rm") + autocmd FileAppendPost *.lzo call gzip#write("lzop -U") augroup END diff --git a/runtime/syntax/gnuplot.vim b/runtime/syntax/gnuplot.vim index 7777cc9e46..9c98e67e58 100644 --- a/runtime/syntax/gnuplot.vim +++ b/runtime/syntax/gnuplot.vim @@ -3,7 +3,7 @@ " Maintainer: Josh Wainwright <wainwright DOT ja AT gmail DOT com> " Last Maintainer: Andrew Rasmussen andyras@users.sourceforge.net " Original Maintainer: John Hoelzel johnh51@users.sourceforge.net -" Last Change: 2015-08-25 +" Last Change: 2020 May 12 " Filenames: *.gnu *.plt *.gpi *.gih *.gp *.gnuplot scripts: #!*gnuplot " URL: http://www.vim.org/scripts/script.php?script_id=4873 " Original URL: http://johnh51.get.to/vim/syntax/gnuplot.vim @@ -479,7 +479,7 @@ syn keyword gnuplotKeyword terminal palette rgb rbg grb gbr brg bgr " ---- Macros ---- " -syn region gnuplotMacro start="@" end=" " +syn match gnuplotMacro "@[a-zA-Z0-9_]*" " ---- Todos ---- " diff --git a/runtime/syntax/masm.vim b/runtime/syntax/masm.vim index abee78b86d..c3b2a9bd63 100644 --- a/runtime/syntax/masm.vim +++ b/runtime/syntax/masm.vim @@ -2,7 +2,7 @@ " Language: Microsoft Macro Assembler (80x86) " Orig Author: Rob Brady <robb@datatone.com> " Maintainer: Wu Yongwei <wuyongwei@gmail.com> -" Last Change: 2020-05-07 17:04:10 +0800 +" Last Change: 2020-05-09 22:55:38 +0800 " Quit when a syntax file was already loaded if exists("b:current_syntax") @@ -12,7 +12,7 @@ endif let s:cpo_save = &cpo set cpo&vim -setlocal iskeyword=@,48-57,_,36,60,62,63,@-@ +syn iskeyword @,48-57,_,36,60,62,63,@-@ syn case ignore diff --git a/runtime/syntax/pamenv.vim b/runtime/syntax/pamenv.vim new file mode 100644 index 0000000000..90359daa61 --- /dev/null +++ b/runtime/syntax/pamenv.vim @@ -0,0 +1,28 @@ +" Vim syntax file +" Language: pam_env.conf(5) configuration file +" Latest Revision: 2020-05-10 + +if exists("b:current_syntax") + finish +endif + +syn keyword pamenvTodo contained TODO FIXME XXX NOTE +syn region pamenvComment start='^#' end='$' display oneline contains=pamenvTodo,@Spells + +syn match pamenvVars '^[A-Z_][A-Z_0-9]*' nextgroup=pamenvKeywords skipwhite + +syn keyword pamenvKeywords contained DEFAULT OVERRIDE nextgroup=pamenvVarEq + +syn match pamenvVarEq contained '=' nextgroup=pamenvValue,pamenvValueWithQuote + +syn match pamenvValue contained '[^ \t]*' skipwhite nextgroup=pamenvKeywords +syn region pamenvValueWithQuote contained start='"' end='"' skipwhite nextgroup=pamenvKeywords + +hi def link pamenvTodo Todo +hi def link pamenvComment Comment +hi def link pamenvKeywords Keyword +hi def link pamenvVars Identifier +hi def link pamenvValue String +hi def link pamenvValueWithQuote String + +let b:current_syntax = "pamenv" diff --git a/runtime/syntax/php.vim b/runtime/syntax/php.vim index 04036fdf39..720d71e646 100644 --- a/runtime/syntax/php.vim +++ b/runtime/syntax/php.vim @@ -1,9 +1,11 @@ " Vim syntax file " Language: php PHP 3/4/5/7 -" Maintainer: Jason Woofenden <jason@jasonwoof.com> -" Last Change: Oct 19, 2019 -" URL: https://jasonwoof.com/gitweb/?p=vim-syntax.git;a=blob;f=php.vim;hb=HEAD -" Former Maintainers: Peter Hodge <toomuchphp-vim@yahoo.com> +" Maintainer: Tyson Andre <tysonandre775@hotmail.com> +" Last Change: May 11, 2020 +" URL: https://github.com/TysonAndre/vim-syntax +" Former Maintainers: +" Jason Woofenden <jason@jasonwoof.com> +" Peter Hodge <toomuchphp-vim@yahoo.com> " Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> " " Note: If you are using a colour terminal with dark background, you will @@ -91,7 +93,7 @@ if exists( "php_htmlInStrings") syn cluster phpAddStrings add=@htmlTop endif -" make sure we can use \ at the begining of the line to do a continuation +" make sure we can use \ at the beginning of the line to do a continuation let s:cpo_save = &cpo set cpo&vim @@ -314,7 +316,7 @@ syn region phpIdentifierComplexP matchgroup=phpParent start="\[" end="]" contain " define a cluster to get all interpolation syntaxes for double-quoted strings syn cluster phpInterpDouble contains=phpInterpSimple,phpInterpSimpleCurly,phpInterpDollarCurly1,phpInterpDollarCurly2,phpInterpBogusDollarCurley,phpInterpComplex -" Methoden +" Methods syn match phpMethodsVar "->\h\w*" contained contains=phpMethods,phpMemberSelector display " Include @@ -328,14 +330,14 @@ syn keyword phpBoolean true false contained " Float " Refer to: https://www.php.net/manual/en/language.types.float.php -syn match phpFloat "\%(\w\|\.\)\@<!\%(\d\|\.\)*\d\%(\d\|\.\)*\%([eE][+-]\=\%(\d\|\.\)\+\)\=\%(\w\|\.\)\@!" contained contains=phpFloatError display -syn match phpFloatError "[eE.].*\." contained display +syn match phpFloat "\%(\w\|\.\)\@<!\%(\d_\?\|\.\)*\d\%(\d\|_\|\.\)*\%([eE][+-]\=\%(\d\|_\|\.\)\+\)\=\%(\w\|\.\)\@!" contained contains=phpFloatError display +syn match phpFloatError "\%([eE.][0-9._+-]*\.\|__\|_\(\>\|[eE]\)\|\(\>\|[eE]\)_\)" contained display " Number -syn match phpNumber "\%(\.\)\@<!\<\%([1-9]\d*\|0\|0[xX]\x\+\)\>\%(\.\)\@!" contained display +syn match phpNumber "\%(\.\)\@<!\<\%([1-9]\d*\|0\|0[xX]\(\x_\?\)*\x\)\>\%(\.\)\@!" contained display syn match phpNumber "\%(\.\)\@<!\<0\d\+\>\%(\.\)\@!" contained contains=phpOctalError display syn match phpBinaryError "[2-9]" contained display -syn match phpNumber "\%(\.\)\@<!\<0[bB]\d\+\>\%(\.\)\@!" contained contains=phpBinaryError display +syn match phpNumber "\%(\.\)\@<!\<0[bB]\(\d_\?\)*\d\>\%(\.\)\@!" contained contains=phpBinaryError display " Backslash escapes syn case match @@ -442,6 +444,7 @@ if exists("php_folding") && php_folding==1 " match one line constructs here and skip them at folding syn keyword phpSCKeyword abstract final private protected public static contained syn keyword phpFCKeyword function contained + syn keyword phpDefine fn contained syn keyword phpStorageClass global contained syn match phpDefine "\(\s\|^\)\(abstract\s\+\|final\s\+\|private\s\+\|protected\s\+\|public\s\+\|static\s\+\)*function\(\s\+.*[;}]\)\@=" contained contains=phpSCKeyword syn match phpStructure "\(\s\|^\)\(abstract\s\+\|final\s\+\)*\(trait\|class\)\(\s\+.*}\)\@=" contained @@ -459,7 +462,7 @@ if exists("php_folding") && php_folding==1 syn region phpFoldCatch matchgroup=Exception start="^\z(\s*\)catch\s\+\([^}]*$\)\@=" matchgroup=Delimiter end="^\z1}" contains=@phpClFunction,phpFoldFunction contained transparent fold extend syn region phpFoldTry matchgroup=Exception start="^\z(\s*\)try\s\+\([^}]*$\)\@=" matchgroup=Delimiter end="^\z1}" contains=@phpClFunction,phpFoldFunction contained transparent fold extend else - syn keyword phpDefine function contained + syn keyword phpDefine function fn contained syn keyword phpStructure abstract class trait interface contained syn keyword phpException catch throw try finally contained syn keyword phpStorageClass final global private protected public static contained diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim index 0f4406d3e1..3a2a6e7b0e 100644 --- a/runtime/syntax/sh.vim +++ b/runtime/syntax/sh.vim @@ -2,8 +2,8 @@ " Language: shell (sh) Korn shell (ksh) bash (sh) " Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM> " Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int> -" Last Change: Oct 16, 2019 -" Version: 189 +" Last Change: Apr 14, 2020 +" Version: 190 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH " For options and settings, please use: :help ft-sh-syntax " This file includes many ideas from Eric Brunet (eric.brunet@ens.fr) @@ -357,19 +357,18 @@ elseif !exists("g:sh_no_error") syn region shExDoubleQuote matchGroup=Error start=+\$"+ skip=+\\\\\|\\.+ end=+"+ contains=shStringSpecial endif syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell nextgroup=shSpecialStart,shSpecialSQ -syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart -syn region shDoubleQuote matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contained contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart +syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\.+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart +syn region shDoubleQuote matchgroup=shQuote start=+"+ matchgroup=shSpecial skip=+\\"+ end=+"+ contained contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart syn match shStringSpecial "[^[:print:] \t]" contained syn match shStringSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shComment -syn match shStringSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" syn match shSpecialSQ "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" contained nextgroup=shBkslshSnglQuote,@shNoZSList syn match shSpecialDQ "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" contained nextgroup=shBkslshDblQuote,@shNoZSList syn match shSpecialStart "\%(\\\\\)*\\[\\"'`$()#]" contained nextgroup=shBkslshSnglQuote,shBkslshDblQuote,@shNoZSList syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]" syn match shSpecialNoZS contained "\%(\\\\\)*\\[\\"'`$()#]" syn match shSpecialNxt contained "\\[\\"'`$()#]" -syn region shBkslshSnglQuote contained matchgroup=shQuote start=+'+ end=+'+ contains=@Spell nextgroup=shSpecialStart -syn region shBkslshDblQuote contained matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart +"syn region shBkslshSnglQuote contained matchgroup=shQuote start=+'+ end=+'+ contains=@Spell nextgroup=shSpecialStart +"syn region shBkslshDblQuote contained matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart " Comments: {{{1 "========== @@ -454,13 +453,13 @@ if !exists("g:sh_no_error") syn match shDerefWordError "[^}$[~]" contained endif syn match shDerefSimple "\$\%(\h\w*\|\d\)" nextgroup=@shNoZSList -syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray +syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray nextgroup=shSpecialStart syn match shDerefSimple "\$[-#*@!?]" nextgroup=@shNoZSList syn match shDerefSimple "\$\$" nextgroup=@shNoZSList -syn match shDerefSimple "\${\d}" nextgroup=@shNoZSList +syn match shDerefSimple "\${\d}" nextgroup=@shNoZSList nextgroup=shSpecialStart if exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix") - syn region shDeref matchgroup=PreProc start="\${##\=" end="}" contains=@shDerefList nextgroup=@shSpecialNoZS - syn region shDeref matchgroup=PreProc start="\${\$\$" end="}" contains=@shDerefList nextgroup=@shSpecialNoZS + syn region shDeref matchgroup=PreProc start="\${##\=" end="}" contains=@shDerefList nextgroup=@shSpecialNoZS,shSpecialStart + syn region shDeref matchgroup=PreProc start="\${\$\$" end="}" contains=@shDerefList nextgroup=@shSpecialNoZS,shSpecialStart endif " ksh: ${!var[*]} array index list syntax: {{{1 |