Update runtime files

This commit is contained in:
Bram Moolenaar
2021-04-07 21:07:20 +02:00
parent 125ed2745c
commit 130cbfc312
30 changed files with 619 additions and 68 deletions

7
.github/CODEOWNERS vendored
View File

@ -42,6 +42,7 @@ runtime/compiler/jshint.vim @dkearns
runtime/compiler/jsonlint.vim @dkearns
runtime/compiler/lazbuild.vim @dkearns
runtime/compiler/php.vim @dkearns
runtime/compiler/powershell.vim @heaths
runtime/compiler/rake.vim @tpope @dkearns
runtime/compiler/rhino.vim @dkearns
runtime/compiler/rspec.vim @tpope @dkearns
@ -67,6 +68,7 @@ runtime/doc/pi_netrw.txt @cecamp
runtime/doc/pi_tar.txt @cecamp
runtime/doc/pi_vimball.txt @cecamp
runtime/doc/pi_zip.txt @cecamp
runtime/doc/ps1.txt @heaths
runtime/ftplugin/awk.vim @dkearns
runtime/ftplugin/basic.vim @dkearns
runtime/ftplugin/bst.vim @tpope
@ -93,6 +95,8 @@ runtime/ftplugin/matlab.vim @cecamp
runtime/ftplugin/nroff.vim @a-vrma
runtime/ftplugin/nsis.vim @k-takata
runtime/ftplugin/pdf.vim @tpope
runtime/ftplugin/ps1.vim @heaths
runtime/ftplugin/ps1xml.vim @heaths
runtime/ftplugin/ruby.vim @tpope @dkearns
runtime/ftplugin/sass.vim @tpope
runtime/ftplugin/scss.vim @tpope
@ -111,6 +115,7 @@ runtime/indent/gitconfig.vim @tpope
runtime/indent/haml.vim @tpope
runtime/indent/liquid.vim @tpope
runtime/indent/nsis.vim @k-takata
runtime/indent/ps1.vim @heaths
runtime/indent/ruby.vim @AndrewRadev @dkearns
runtime/indent/sass.vim @tpope
runtime/indent/scss.vim @tpope
@ -173,6 +178,8 @@ runtime/syntax/pdf.vim @tpope
runtime/syntax/php.vim @TysonAndre
runtime/syntax/privoxy.vim @dkearns
runtime/syntax/prolog.vim @XVilka
runtime/syntax/ps1.vim @heaths
runtime/syntax/ps1xml.vim @heaths
runtime/syntax/rc.vim @chrisbra
runtime/syntax/rpcgen.vim @cecamp
runtime/syntax/ruby.vim @dkearns

View File

@ -0,0 +1,84 @@
" Vim compiler file
" Compiler: powershell
" URL: https://github.com/PProvost/vim-ps1
" Last Change: 2020 Mar 30
if exists("current_compiler")
finish
endif
let current_compiler = "powershell"
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
let s:cpo_save = &cpo
set cpo-=C
if !exists("g:ps1_makeprg_cmd")
if executable('pwsh')
" pwsh is the future
let g:ps1_makeprg_cmd = 'pwsh'
elseif executable('pwsh.exe')
let g:ps1_makeprg_cmd = 'pwsh.exe'
elseif executable('powershell.exe')
let g:ps1_makeprg_cmd = 'powershell.exe'
else
let g:ps1_makeprg_cmd = ''
endif
endif
if !executable(g:ps1_makeprg_cmd)
echoerr "To use the powershell compiler, please set g:ps1_makeprg_cmd to the powershell executable!"
endif
" Show CategoryInfo, FullyQualifiedErrorId, etc?
let g:ps1_efm_show_error_categories = get(g:, 'ps1_efm_show_error_categories', 0)
" Use absolute path because powershell requires explicit relative paths
" (./file.ps1 is okay, but # expands to file.ps1)
let &l:makeprg = g:ps1_makeprg_cmd .' %:p:S'
" Parse file, line, char from callstacks:
" Write-Ouput : The term 'Write-Ouput' is not recognized as the name of a
" cmdlet, function, script file, or operable program. Check the spelling
" of the name, or if a path was included, verify that the path is correct
" and try again.
" At C:\script.ps1:11 char:5
" + Write-Ouput $content
" + ~~~~~~~~~~~
" + CategoryInfo : ObjectNotFound: (Write-Ouput:String) [], CommandNotFoundException
" + FullyQualifiedErrorId : CommandNotFoundException
" Showing error in context with underlining.
CompilerSet errorformat=%+G+%m
" Error summary.
CompilerSet errorformat+=%E%*\\S\ :\ %m
" Error location.
CompilerSet errorformat+=%CAt\ %f:%l\ char:%c
" Errors that span multiple lines (may be wrapped to width of terminal).
CompilerSet errorformat+=%C%m
" Ignore blank/whitespace-only lines.
CompilerSet errorformat+=%Z\\s%#
if g:ps1_efm_show_error_categories
CompilerSet errorformat^=%+G\ \ \ \ +\ %.%#\\s%#:\ %m
else
CompilerSet errorformat^=%-G\ \ \ \ +\ %.%#\\s%#:\ %m
endif
" Parse file, line, char from of parse errors:
" At C:\script.ps1:22 char:16
" + Stop-Process -Name "invalidprocess
" + ~~~~~~~~~~~~~~~
" The string is missing the terminator: ".
" + CategoryInfo : ParserError: (:) [], ParseException
" + FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
CompilerSet errorformat+=At\ %f:%l\ char:%c
let &cpo = s:cpo_save
unlet s:cpo_save
" vim:set sw=2 sts=2:

View File

@ -30,6 +30,7 @@ DOCS = \
filetype.txt \
fold.txt \
ft_ada.txt \
ft_ps1.txt \
ft_rust.txt \
ft_sql.txt \
gui.txt \
@ -173,6 +174,7 @@ HTMLS = \
filetype.html \
fold.html \
ft_ada.html \
ft_ps1.html \
ft_rust.html \
ft_sql.html \
gui.html \

View File

@ -1,4 +1,4 @@
*cmdline.txt* For Vim version 8.2. Last change: 2021 Jan 26
*cmdline.txt* For Vim version 8.2. Last change: 2021 Apr 05
VIM REFERENCE MANUAL by Bram Moolenaar
@ -597,9 +597,11 @@ followed by another Vim command:
:global
:help
:helpfind
:helpgrep
:lcscope
:ldo
:lfdo
:lhelpgrep
:make
:normal
:perl

View File

@ -1,4 +1,4 @@
*editing.txt* For Vim version 8.2. Last change: 2021 Jan 08
*editing.txt* For Vim version 8.2. Last change: 2021 Apr 05
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1253,7 +1253,7 @@ For versions of Vim where browsing is not supported, the command is executed
unmodified.
*browsefilter*
For MS Windows and GTK, you can modify the filters that are used in the browse
For MS-Windows and GTK, you can modify the filters that are used in the browse
dialog. By setting the g:browsefilter or b:browsefilter variables, you can
change the filters globally or locally to the buffer. The variable is set to
a string in the format "{filter label}\t{pattern};{pattern}\n" where {filter

View File

@ -1,4 +1,4 @@
*eval.txt* For Vim version 8.2. Last change: 2021 Mar 28
*eval.txt* For Vim version 8.2. Last change: 2021 Apr 07
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1550,8 +1550,11 @@ the following ways:
The arguments are optional. Example: >
:let F = {-> 'error function'}
:echo F()
:echo F('ignored')
< error function
Note that in Vim9 script another kind of lambda can be used: |vim9-lambda|.
*closure*
Lambda expressions can access outer scope variables and arguments. This is
often called a closure. Example where "i" and "a:arg" are used in a lambda
@ -1586,7 +1589,7 @@ The lambda expression is also useful for Channel, Job and timer: >
Handler called
Note how execute() is used to execute an Ex command. That's ugly though.
In Vim9 script you can use a command block, see |inline-function|.
Lambda expressions have internal names like '<lambda>42'. If you get an error
for a lambda expression, you can find what it is with the following command: >
@ -6087,7 +6090,7 @@ getwininfo([{winid}]) *getwininfo()*
tab pages is returned.
Each List item is a |Dictionary| with the following entries:
botline last displayed buffer line
botline last complete displayed buffer line
bufnr number of buffer in the window
height window height (excluding winbar)
loclist 1 if showing a location list
@ -11866,7 +11869,7 @@ gui_mac Compiled with Macintosh GUI.
gui_motif Compiled with Motif GUI.
gui_photon Compiled with Photon GUI.
gui_running Vim is running in the GUI, or it will start soon.
gui_win32 Compiled with MS Windows Win32 GUI.
gui_win32 Compiled with MS-Windows Win32 GUI.
gui_win32s idem, and Win32s system being used (Windows 3.1)
haiku Haiku version of Vim.
hangul_input Compiled with Hangul input support. |hangul|

64
runtime/doc/ft_ps1.txt Normal file
View File

@ -0,0 +1,64 @@
*ps1.txt* A Windows PowerShell syntax plugin for Vim
Author: Peter Provost <https://www.github.com/PProvost>
License: Apache 2.0
URL: https://github.com/PProvost/vim-ps1
INTRODUCTION *ps1-syntax*
This plugin provides Vim syntax, indent and filetype detection for Windows
PowerShell scripts, modules, and XML configuration files.
ABOUT *ps1-about*
Grab the latest version or report a bug on GitHub:
https://github.com/PProvost/vim-ps1
FOLDING *ps1-folding*
The ps1 syntax file provides syntax folding (see |:syn-fold|) for script blocks
and digital signatures in scripts.
When 'foldmethod' is set to "syntax" then function script blocks will be
folded unless you use the following in your .vimrc or before opening a script: >
:let g:ps1_nofold_blocks = 1
<
Digital signatures in scripts will also be folded unless you use: >
:let g:ps1_nofold_sig = 1
<
Note: syntax folding might slow down syntax highlighting significantly,
especially for large files.
COMPILER *ps1-compiler*
The powershell `:compiler` script configures |:make| to execute the script in
PowerShell.
It tries to pick a smart default PowerShell command: `pwsh` if available and
`powershell` otherwise, but you can customize the command: >
:let g:ps1_makeprg_cmd = '/path/to/pwsh'
<
To configure whether to show the exception type information: >
:let g:ps1_efm_show_error_categories = 1
<
KEYWORD LOOKUP *ps1-keyword*
To look up keywords using PowerShell's Get-Help, press the |K| key. For more
convenient paging, the pager `less` should be installed, which is included in
many Linux distributions and in macOS.
Many other distributions are available for Windows like
https://chocolatey.org/packages/less/. Make sure `less` is in a directory
listed in the `PATH` environment variable, which chocolatey above does.
------------------------------------------------------------------------------
vim:ft=help:

View File

@ -1,4 +1,4 @@
*gui_w32.txt* For Vim version 8.2. Last change: 2020 Mar 25
*gui_w32.txt* For Vim version 8.2. Last change: 2021 Apr 05
VIM REFERENCE MANUAL by Bram Moolenaar
@ -403,7 +403,7 @@ The "File/Print" menu prints the text with syntax highlighting, see
printer installed this should also work: >
:w >>prn
Vim supports a number of standard MS Windows features. Some of these are
Vim supports a number of standard MS-Windows features. Some of these are
detailed elsewhere: see |'mouse'|, |win32-hidden-menus|.
*drag-n-drop-win32*

View File

@ -1,4 +1,4 @@
*if_lua.txt* For Vim version 8.2. Last change: 2020 Jun 28
*if_lua.txt* For Vim version 8.2. Last change: 2021 Apr 07
VIM REFERENCE MANUAL by Luis Carvalho

View File

@ -1,4 +1,4 @@
*mbyte.txt* For Vim version 8.2. Last change: 2020 Aug 15
*mbyte.txt* For Vim version 8.2. Last change: 2021 Apr 05
VIM REFERENCE MANUAL by Bram Moolenaar et al.
@ -770,7 +770,7 @@ is suitable for complex input, such as CJK.
of the two ways: FrontEnd system and BackEnd system. In the FrontEnd
system, input events are snatched by the |IM-server| first, then |IM-server|
give the application the result of input. On the other hand, the BackEnd
system works reverse order. MS Windows adopt BackEnd system. In X, most of
system works reverse order. MS-Windows adopt BackEnd system. In X, most of
|IM-server|s adopt FrontEnd system. The demerit of BackEnd system is the
large overhead in communication, but it provides safe synchronization with
no restrictions on applications.

View File

@ -1,4 +1,4 @@
*options.txt* For Vim version 8.2. Last change: 2021 Mar 29
*options.txt* For Vim version 8.2. Last change: 2021 Apr 07
VIM REFERENCE MANUAL by Bram Moolenaar
@ -4148,7 +4148,7 @@ A jump table for the options with a short description can be found at |Q_op|.
the window. This happens only when the 'icon' option is on.
Only works if the terminal supports setting window icon text
(currently only X11 GUI and terminals with a non-empty 't_IS' option).
Does not work for MS Windows.
Does not work for MS-Windows.
When Vim was compiled with HAVE_X11 defined, the original icon will be
restored if possible |X11|.
When this option contains printf-style '%' items, they will be
@ -5036,7 +5036,7 @@ A jump table for the options with a short description can be found at |Q_op|.
jump between two double quotes.
The characters must be separated by a colon.
The pairs must be separated by a comma. Example for including '<' and
'>' (HTML): >
'>' (for HTML): >
:set mps+=<:>
< A more exotic example, to jump between the '=' and ';' in an
@ -8790,23 +8790,31 @@ A jump table for the options with a short description can be found at |Q_op|.
part specifies what to do for each consecutive use of 'wildchar'. The
first part specifies the behavior for the first use of 'wildchar',
The second part for the second use, etc.
These are the possible values for each part:
Each part consists of a colon separated list consisting of the
following possible values:
"" Complete only the first match.
"full" Complete the next full match. After the last match,
the original string is used and then the first match
again.
again. Will also start 'wildmenu' if it is enabled.
"longest" Complete till longest common string. If this doesn't
result in a longer string, use the next part.
"longest:full" Like "longest", but also start 'wildmenu' if it is
enabled.
"list" When more than one match, list all matches.
"lastused" When completing buffer names and more than one buffer
matches, sort buffers by time last used (other than
the current buffer).
When there is only a single match, it is fully completed in all cases.
Examples of useful colon-separated values:
"longest:full" Like "longest", but also start 'wildmenu' if it is
enabled. Will not complete to the next full match.
"list:full" When more than one match, list all matches and
complete first match.
"list:longest" When more than one match, list all matches and
complete till longest common string.
"list:lastused" When more than one buffer matches, sort buffers
by time last used (other than the current buffer).
When there is only a single match, it is fully completed in all cases.
"list:lastused" When more than one buffer matches, list all matches
and sort buffers by time last used (other than the
current buffer).
Examples: >
:set wildmode=full

View File

@ -1,4 +1,4 @@
*os_win32.txt* For Vim version 8.2. Last change: 2017 Mar 21
*os_win32.txt* For Vim version 8.2. Last change: 2021 Apr 05
VIM REFERENCE MANUAL by George Reilly
@ -83,7 +83,7 @@ executable() returns 1 the executable can actually be executed.
Command line arguments *win32-cmdargs*
Analysis of a command line into parameters is not standardised in MS Windows.
Analysis of a command line into parameters is not standardised in MS-Windows.
Vim and gvim used to use different logic to parse it (before 7.4.432), and the
logic was also depended on what it was compiled with. Now Vim and gvim both
use the CommandLineToArgvW() Win32 API, so they behave in the same way.

View File

@ -1,4 +1,4 @@
*syntax.txt* For Vim version 8.2. Last change: 2021 Mar 06
*syntax.txt* For Vim version 8.2. Last change: 2021 Apr 02
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@ -5434,6 +5434,7 @@ assert_fails() testing.txt /*assert_fails()*
assert_false() testing.txt /*assert_false()*
assert_inrange() testing.txt /*assert_inrange()*
assert_match() testing.txt /*assert_match()*
assert_nobeep() testing.txt /*assert_nobeep()*
assert_notequal() testing.txt /*assert_notequal()*
assert_notmatch() testing.txt /*assert_notmatch()*
assert_report() testing.txt /*assert_report()*
@ -7507,6 +7508,7 @@ info-message starting.txt /*info-message*
inform.vim syntax.txt /*inform.vim*
informix ft_sql.txt /*informix*
initialization starting.txt /*initialization*
inline-function vim9.txt /*inline-function*
input() eval.txt /*input()*
inputdialog() eval.txt /*inputdialog()*
inputlist() eval.txt /*inputlist()*
@ -8582,6 +8584,12 @@ prop_type_change() textprop.txt /*prop_type_change()*
prop_type_delete() textprop.txt /*prop_type_delete()*
prop_type_get() textprop.txt /*prop_type_get()*
prop_type_list() textprop.txt /*prop_type_list()*
ps1-about ft_ps1.txt /*ps1-about*
ps1-compiler ft_ps1.txt /*ps1-compiler*
ps1-folding ft_ps1.txt /*ps1-folding*
ps1-keyword ft_ps1.txt /*ps1-keyword*
ps1-syntax ft_ps1.txt /*ps1-syntax*
ps1.txt ft_ps1.txt /*ps1.txt*
psql ft_sql.txt /*psql*
ptcap.vim syntax.txt /*ptcap.vim*
pterm-mouse options.txt /*pterm-mouse*
@ -10137,6 +10145,7 @@ vim9-export vim9.txt /*vim9-export*
vim9-final vim9.txt /*vim9-final*
vim9-gotchas vim9.txt /*vim9-gotchas*
vim9-import vim9.txt /*vim9-import*
vim9-lambda vim9.txt /*vim9-lambda*
vim9-mix vim9.txt /*vim9-mix*
vim9-namespace vim9.txt /*vim9-namespace*
vim9-rationale vim9.txt /*vim9-rationale*

View File

@ -1,4 +1,4 @@
*testing.txt* For Vim version 8.2. Last change: 2021 Mar 10
*testing.txt* For Vim version 8.2. Last change: 2021 Apr 02
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.2. Last change: 2021 Mar 29
*todo.txt* For Vim version 8.2. Last change: 2021 Apr 05
VIM REFERENCE MANUAL by Bram Moolenaar
@ -42,17 +42,12 @@ Vim9 - Make everything work:
- For builtin functions using tv_get_string*() use check_for_string() to be
more strict about the argument type (not a bool).
done: balloon_()
- Run the same tests in :def and Vim9 script, like in Test_expr7_not()
- Check many more builtin function arguments at compile time.
- make 0 == 'string' fail on the script level, like inside :def.
- Check that when using a user function name without prefix, it does not find
a global function. Prefixing g: is required.
- Appending to dict item doesn't work in a :def function:
var d: dict<string> = {a: 'x'}
d['a'] ..= 'y'
d.a ..= 'y'
Test to be extended: Test_assign_dict_with_op()
- Using ".." at script level doesn't convert arguments to a string.
- This fails in a :def function but not at the script level:
var s = 'asdf'->((a) => a)('x')
Disallow passing more arguments to lambda than expected?
- Implement blob index and slice, also with assignment?
- Compile replacement of :s command: s/pat/\=expr/
- Compile redir to local variable: var_redir_start().
- Implement type cast at the script level.

View File

@ -43,7 +43,7 @@ like:
|~ |
|"file.txt" [New file] |
+---------------------------------------+
('#" is the cursor position.)
('#' is the cursor position.)
The tilde (~) lines indicate lines not in the file. In other words, when Vim
runs out of file to display, it displays tilde lines. At the bottom of the

View File

@ -1,4 +1,4 @@
*version5.txt* For Vim version 8.2. Last change: 2020 Dec 19
*version5.txt* For Vim version 8.2. Last change: 2021 Apr 05
VIM REFERENCE MANUAL by Bram Moolenaar
@ -405,7 +405,7 @@ Both of these are only available when enabled at compile time.
Win32 GUI version *added-win32-GUI*
-----------------
The GUI has been ported to MS Windows 95 and NT. All the features of the X11
The GUI has been ported to MS-Windows 95 and NT. All the features of the X11
GUI are available to Windows users now. |gui-w32|
This also fixes problems with running the Win32 console version under Windows
95, where console support has always been bad.
@ -4403,7 +4403,7 @@ the last char of the line, "<<" moved an extra line. Also for other operators
that always work on lines.
link.sh changed "-lnsl_s" to "_s" when looking for "nsl" to be removed.
Now it only remove whole words.
Now it only removes whole words.
When jumped to a mark or using "fz", and there is an error, the current column
was lost. E.g. when using "$fzj".

View File

@ -1,4 +1,4 @@
*version6.txt* For Vim version 8.2. Last change: 2021 Jan 17
*version6.txt* For Vim version 8.2. Last change: 2021 Apr 05
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1025,7 +1025,7 @@ Port to OS/390 Unix (Ralf Schandl)
Included jsbmouse support. (Darren Garth)
Support for dec mouse in Unix. (Steve Wall)
Port to 16-bit MS Windows (Windows 3.1x) (Vince Negri)
Port to 16-bit MS-Windows (Windows 3.1x) (Vince Negri)
Port to QNX. Supports the Photon GUI, mouse, etc. (Julian Kinraid)

View File

@ -1,4 +1,4 @@
*vim9.txt* For Vim version 8.2. Last change: 2021 Mar 30
*vim9.txt* For Vim version 8.2. Last change: 2021 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar
@ -305,13 +305,21 @@ Variables, functions and function arguments cannot shadow previously defined
or imported variables and functions in the same script file.
Variables may shadow Ex commands, rename the variable if needed.
Global variables and user defined functions must be prefixed with "g:", also
at the script level. >
Global variables must be prefixed with "g:", also at the script level. >
vim9script
var script_local = 'text'
g:global = 'value'
var Funcref = g:ThatFunction
Global functions must be prefixed with "g:" when defining them, but can be
called without "g:". >
vim9script
def g:GlobalFunc(): string
return 'text'
enddef
echo GlobalFunc()
The "g:" prefix is not needed for auto-load functions.
Since `&opt = value` is now assigning a value to option "opt", ":&" cannot be
used to repeat a `:substitute` command.
@ -401,7 +409,7 @@ number of arguments and any return type. The function can be defined later.
Lambda using => instead of -> ~
*vim9-lambda*
In legacy script there can be confusion between using "->" for a method call
and for a lambda. Also, when a "{" is found the parser needs to figure out if
it is the start of a lambda or a dictionary, which is now more complicated
@ -425,12 +433,19 @@ But you can use a backslash to concatenate the lines before parsing: >
filter(list, (k,
\ v)
\ => v > 0)
< *inline-function*
Additionally, a lambda can contain statements in {}: >
var Lambda = (arg) => {
g:was_called = 'yes'
return expression
}
This can be useful for a timer, for example: >
var count = 0
var timer = timer_start(500, (_) => {
count += 1
echom 'Handler called ' .. count
}, {repeat: 3})
The ending "}" must be at the start of a line. It can be followed by other
characters, e.g.: >
@ -836,7 +851,7 @@ Patterns are used like 'magic' is set, unless explicitly overruled.
The 'edcompatible' option value is not used.
The 'gdefault' option value is not used.
You may also find this wiki useful. It was written by an early adoptor of
You may also find this wiki useful. It was written by an early adopter of
Vim9 script: https://github.com/lacygoill/wiki/blob/master/vim/vim9.md
==============================================================================
@ -881,14 +896,14 @@ THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
:enddef End of a function defined with `:def`. It should be on
a line by its own.
You may also find this wiki useful. It was written by an early adoptor of
You may also find this wiki useful. It was written by an early adopter of
Vim9 script: https://github.com/lacygoill/wiki/blob/master/vim/vim9.md
If the script the function is defined in is Vim9 script, then script-local
variables can be accessed without the "s:" prefix. They must be defined
before the function is compiled. If the script the function is defined in is
legacy script, then script-local variables must be accessed with the "s:"
prefix and they do not need to exist (they can be deleted any time).
prefix if they do not exist at the time of compiling.
*:defc* *:defcompile*
:defc[ompile] Compile functions defined in the current script that
@ -1073,12 +1088,15 @@ dictionary. If there is a mix of types, the "any" type is used. >
['a', 'b', 'c'] list<string>
[1, 'x', 3] list<any>
For script-local variables in Vim9 script the type is checked, also when the
variable was declared in a legacy function.
Stricter type checking ~
*type-checking*
In legacy Vim script, where a number was expected, a string would be
automatically converted to a number. This was convenient for an actual number
such as "123", but leads to unexpected problems (but no error message) if the
such as "123", but leads to unexpected problems (and no error message) if the
string doesn't start with a number. Quite often this leads to hard-to-find
bugs.

View File

@ -1,13 +1,13 @@
" Vim settings file
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, 77, 66)
" Version: (v52) 2020 October 07
" Version: (v53) 2021 April 06
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
" Usage: For instructions, do :help fortran-plugin from Vim
" Credits:
" Version 0.1 was created in September 2000 by Ajit Thakkar.
" Since then, useful suggestions and contributions have been made, in order, by:
" Stefano Zacchiroli, Hendrik Merx, Ben Fritz, David Barnett, Eisuke Kawashima,
" and Doug Kearns.
" Doug Kearns, and Fritz Reese.
" Only do these settings when not done yet for this buffer
if exists("b:did_ftplugin")
@ -66,12 +66,19 @@ endif
" Set comments and textwidth according to source type
if (b:fortran_fixed_source == 1)
setlocal comments=:!,:*,:C
" Fixed format requires a textwidth of 72 for code
setlocal tw=72
" Fixed format requires a textwidth of 72 for code,
" but some vendor extensions allow longer lines
if exists("fortran_extended_line_length")
setlocal tw=132
elseif exists("fortran_cardimage_line_length")
setlocal tw=80
else
setlocal tw=72
" If you need to add "&" on continued lines so that the code is
" compatible with both free and fixed format, then you should do so
" in column 73 and uncomment the next line
" setlocal tw=73
endif
else
setlocal comments=:!
" Free format allows a textwidth of 132

59
runtime/ftplugin/ps1.vim Normal file
View File

@ -0,0 +1,59 @@
" Vim filetype plugin file
" Language: Windows PowerShell
" URL: https://github.com/PProvost/vim-ps1
" Last Change: 2021 Apr 02
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin") | finish | endif
" Don't load another plug-in for this buffer
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal tw=0
setlocal commentstring=#%s
setlocal formatoptions=tcqro
" Enable autocompletion of hyphenated PowerShell commands,
" e.g. Get-Content or Get-ADUser
setlocal iskeyword+=-
" Change the browse dialog on Win32 to show mainly PowerShell-related files
if has("gui_win32")
let b:browsefilter =
\ "All PowerShell Files (*.ps1, *.psd1, *.psm1, *.ps1xml)\t*.ps1;*.psd1;*.psm1;*.ps1xml\n" .
\ "PowerShell Script Files (*.ps1)\t*.ps1\n" .
\ "PowerShell Module Files (*.psd1, *.psm1)\t*.psd1;*.psm1\n" .
\ "PowerShell XML Files (*.ps1xml)\t*.ps1xml\n" .
\ "All Files (*.*)\t*.*\n"
endif
" Look up keywords by Get-Help:
" check for PowerShell Core in Windows, Linux or MacOS
if executable('pwsh') | let s:pwsh_cmd = 'pwsh'
" on Windows Subsystem for Linux, check for PowerShell Core in Windows
elseif exists('$WSLENV') && executable('pwsh.exe') | let s:pwsh_cmd = 'pwsh.exe'
" check for PowerShell <= 5.1 in Windows
elseif executable('powershell.exe') | let s:pwsh_cmd = 'powershell.exe'
endif
if exists('s:pwsh_cmd')
if !has('gui_running') && executable('less') &&
\ !(exists('$ConEmuBuild') && &term =~? '^xterm')
" For exclusion of ConEmu, see https://github.com/Maximus5/ConEmu/issues/2048
command! -buffer -nargs=1 GetHelp silent exe '!' . s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full "<args>" | ' . (has('unix') ? 'LESS= less' : 'less') | redraw!
elseif has('terminal')
command! -buffer -nargs=1 GetHelp silent exe 'term ' . s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full "<args>"' . (executable('less') ? ' | less' : '')
else
command! -buffer -nargs=1 GetHelp echo system(s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full <args>')
endif
endif
setlocal keywordprg=:GetHelp
" Undo the stuff we changed
let b:undo_ftplugin = "setlocal tw< cms< fo< iskeyword< keywordprg<" .
\ " | unlet! b:browsefilter"
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@ -0,0 +1,34 @@
" Vim filetype plugin file
" Language: Windows PowerShell
" URL: https://github.com/PProvost/vim-ps1
" Last Change: 2021 Apr 02
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin") | finish | endif
" Don't load another plug-in for this buffer
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal tw=0
setlocal commentstring=#%s
setlocal formatoptions=tcqro
" Change the browse dialog on Win32 to show mainly PowerShell-related files
if has("gui_win32")
let b:browsefilter =
\ "All PowerShell Files (*.ps1, *.psd1, *.psm1, *.ps1xml)\t*.ps1;*.psd1;*.psm1;*.ps1xml\n" .
\ "PowerShell Script Files (*.ps1)\t*.ps1\n" .
\ "PowerShell Module Files (*.psd1, *.psm1)\t*.psd1;*.psm1\n" .
\ "PowerShell XML Files (*.ps1xml)\t*.ps1xml\n" .
\ "All Files (*.*)\t*.*\n"
endif
" Undo the stuff we changed
let b:undo_ftplugin = "setlocal tw< cms< fo<" .
\ " | unlet! b:browsefilter"
let &cpo = s:cpo_save
unlet s:cpo_save

17
runtime/indent/ps1.vim Normal file
View File

@ -0,0 +1,17 @@
" Vim indent file
" Language: Windows PowerShell
" URL: https://github.com/PProvost/vim-ps1
" Last Change: 2017 Oct 19
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
" smartindent is good enough for powershell
setlocal smartindent
" disable the indent removal for # marks
inoremap <buffer> # X#
let b:undo_indent = "setl si<"

View File

@ -1,6 +1,6 @@
" Vim plugin for showing matching parens
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2020 Jun 18
" Last Change: 2021 Apr 07
" Exit quickly when:
" - this plugin was already loaded (or disabled)
@ -107,9 +107,10 @@ func s:Highlight_Matching_Pair()
" Build an expression that detects whether the current cursor position is
" in certain syntax types (string, comment, etc.), for use as
" searchpairpos()'s skip argument.
" We match "escape" for special items, such as lispEscapeSpecial.
" We match "escape" for special items, such as lispEscapeSpecial, and
" match "symbol" for lispBarSymbol.
let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' .
\ '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))'
\ '''v:val =~? "string\\|character\\|singlequote\\|escape\\symbol\\|comment"''))'
" If executing the expression determines that the cursor is currently in
" one of the syntax types, then we want searchpairpos() to find the pair
" within those syntax types (i.e., not skip). Otherwise, the cursor is

View File

@ -1,6 +1,6 @@
" Vim syntax file
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
" Version: (v103) 2020 October 07
" Version: (v104) 2021 April 06
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
" Usage: For instructions, do :help fortran-syntax from Vim
" Credits:
@ -8,10 +8,10 @@
" older Fortran 77 syntax file by Mario Eusebio and Preben Guldberg.
" Since then, useful suggestions and contributions have been made, in order, by:
" Andrej Panjkov, Bram Moolenaar, Thomas Olsen, Michael Sternberg, Christian Reile,
" Walter Dieudonné, Alexander Wagner, Roman Bertle, Charles Rendleman,
" Walter Dieudonne, Alexander Wagner, Roman Bertle, Charles Rendleman,
" Andrew Griffiths, Joe Krahn, Hendrik Merx, Matt Thompson, Jan Hermann,
" Stefano Zaghi, Vishnu V. Krishnan, Judicaël Grasset, Takuma Yoshida,
" Eisuke Kawashima, and André Chalella.`
" Stefano Zaghi, Vishnu V. Krishnan, Judicael Grasset, Takuma Yoshida,
" Eisuke Kawashima, Andre Chalella, and Fritz Reese.
if exists("b:current_syntax")
finish
@ -360,8 +360,15 @@ syn cluster fortranCommentGroup contains=fortranTodo
if (b:fortran_fixed_source == 1)
if !exists("fortran_have_tabs")
"Flag items beyond column 72
syn match fortranSerialNumber excludenl "^.\{73,}$"lc=72
" Fixed format requires a textwidth of 72 for code,
" but some vendor extensions allow longer lines
if exists("fortran_extended_line_length")
syn match fortranSerialNumber excludenl "^.\{133,}$"lc=132
elseif exists("fortran_cardimage_line_length")
syn match fortranSerialNumber excludenl "^.\{81,}$"lc=80
else
syn match fortranSerialNumber excludenl "^.\{73,}$"lc=72
endif
"Flag left margin errors
syn match fortranLabelError "^.\{-,4}[^0-9 ]" contains=fortranTab
syn match fortranLabelError "^.\{4}\d\S"

View File

@ -3,7 +3,7 @@
" Maintainer: Andrii Sokolov <andriy145@gmail.com>
" Original Author: Manuel M.H. Stol <Manuel.Stol@allieddata.nl>
" Former Maintainer: Manuel M.H. Stol <Manuel.Stol@allieddata.nl>
" Contributors: Leonard König <leonard.r.koenig@gmail.com> (C string highlighting)
" Contributors: Leonard König <leonard.r.koenig@gmail.com> (C string highlighting), Peter Stanhope <dev.rptr@gmail.com> (Add missing 64-bit mode registers)
" Last Change: 2017 Jan 23
" NASM Home: http://www.nasm.us/
@ -240,7 +240,8 @@ syn cluster nasmGrpPreProcs contains=nasmMacroDef,@nasmGrpInMacros,@nasmGrpPreCo
syn match nasmGen08Register "\<[A-D][HL]\>"
syn match nasmGen16Register "\<\([A-D]X\|[DS]I\|[BS]P\)\>"
syn match nasmGen32Register "\<E\([A-D]X\|[DS]I\|[BS]P\)\>"
syn match nasmGen64Register "\<R\([A-D]X\|[DS]I\|[BS]P\|[89]\|1[0-5]\|[89][WD]\|1[0-5][WD]\)\>"
syn match nasmGen64Register "\<R\([A-D]X\|[DS]I\|[BS]P\|[89]\|1[0-5]\|[89][WDB]\|1[0-5][WDB]\)\>"
syn match nasmExtRegister "\<\([SB]PL\|[SD]IL\)\>"
syn match nasmSegRegister "\<[C-GS]S\>"
syn match nasmSpcRegister "\<E\=IP\>"
syn match nasmFpuRegister "\<ST\o\>"

182
runtime/syntax/ps1.vim Normal file
View File

@ -0,0 +1,182 @@
" Vim syntax file
" Language: Windows PowerShell
" URL: https://github.com/PProvost/vim-ps1
" Last Change: 2020 Nov 24
"
" The following settings are available for tuning syntax highlighting:
" let ps1_nofold_blocks = 1
" let ps1_nofold_sig = 1
" let ps1_nofold_region = 1
if exists("b:current_syntax")
finish
endif
" Operators contain dashes
setlocal iskeyword+=-
" PowerShell doesn't care about case
syn case ignore
" Sync-ing method
syn sync minlines=100
" Certain tokens can't appear at the top level of the document
syn cluster ps1NotTop contains=@ps1Comment,ps1CDocParam,ps1FunctionDeclaration
" Comments and special comment words
syn keyword ps1CommentTodo TODO FIXME XXX TBD HACK NOTE contained
syn match ps1CDocParam /.*/ contained
syn match ps1CommentDoc /^\s*\zs\.\w\+\>/ nextgroup=ps1CDocParam contained
syn match ps1CommentDoc /#\s*\zs\.\w\+\>/ nextgroup=ps1CDocParam contained
syn match ps1Comment /#.*/ contains=ps1CommentTodo,ps1CommentDoc,@Spell
syn region ps1Comment start="<#" end="#>" contains=ps1CommentTodo,ps1CommentDoc,@Spell
" Language keywords and elements
syn keyword ps1Conditional if else elseif switch default
syn keyword ps1Repeat while for do until break continue foreach in
syn match ps1Repeat /\<foreach\>/ nextgroup=ps1Block skipwhite
syn match ps1Keyword /\<while\>/ nextgroup=ps1Block skipwhite
syn match ps1Keyword /\<where\>/ nextgroup=ps1Block skipwhite
syn keyword ps1Exception begin process end exit inlinescript parallel sequence
syn keyword ps1Keyword try catch finally throw
syn keyword ps1Keyword return filter in trap param data dynamicparam
syn keyword ps1Constant $true $false $null
syn match ps1Constant +\$?+
syn match ps1Constant +\$_+
syn match ps1Constant +\$\$+
syn match ps1Constant +\$^+
" Keywords reserved for future use
syn keyword ps1Keyword class define from using var
" Function declarations
syn keyword ps1Keyword function nextgroup=ps1Function skipwhite
syn keyword ps1Keyword filter nextgroup=ps1Function skipwhite
syn keyword ps1Keyword workflow nextgroup=ps1Function skipwhite
syn keyword ps1Keyword configuration nextgroup=ps1Function skipwhite
syn keyword ps1Keyword class nextgroup=ps1Function skipwhite
syn keyword ps1Keyword enum nextgroup=ps1Function skipwhite
" Function declarations and invocations
syn match ps1Cmdlet /\v(add|clear|close|copy|enter|exit|find|format|get|hide|join|lock|move|new|open|optimize|pop|push|redo|remove|rename|reset|search|select|Set|show|skip|split|step|switch|undo|unlock|watch)(-\w+)+/ contained
syn match ps1Cmdlet /\v(connect|disconnect|read|receive|send|write)(-\w+)+/ contained
syn match ps1Cmdlet /\v(backup|checkpoint|compare|compress|convert|convertfrom|convertto|dismount|edit|expand|export|group|import|initialize|limit|merge|mount|out|publish|restore|save|sync|unpublish|update)(-\w+)+/ contained
syn match ps1Cmdlet /\v(debug|measure|ping|repair|resolve|test|trace)(-\w+)+/ contained
syn match ps1Cmdlet /\v(approve|assert|build|complete|confirm|deny|deploy|disable|enable|install|invoke|register|request|restart|resume|start|stop|submit|suspend|uninstall|unregister|wait)(-\w+)+/ contained
syn match ps1Cmdlet /\v(block|grant|protect|revoke|unblock|unprotect)(-\w+)+/ contained
syn match ps1Cmdlet /\v(use)(-\w+)+/ contained
" Other functions
syn match ps1Function /\w\+\(-\w\+\)\+/ contains=ps1Cmdlet
" Type declarations
syn match ps1Type /\[[a-z_][a-z0-9_.,\[\]]\+\]/
" Variable references
syn match ps1ScopeModifier /\(global:\|local:\|private:\|script:\)/ contained
syn match ps1Variable /\$\w\+\(:\w\+\)\?/ contains=ps1ScopeModifier
syn match ps1Variable /\${\w\+\(:\?[[:alnum:]_()]\+\)\?}/ contains=ps1ScopeModifier
" Operators
syn keyword ps1Operator -eq -ne -ge -gt -lt -le -like -notlike -match -notmatch -replace -split -contains -notcontains
syn keyword ps1Operator -ieq -ine -ige -igt -ile -ilt -ilike -inotlike -imatch -inotmatch -ireplace -isplit -icontains -inotcontains
syn keyword ps1Operator -ceq -cne -cge -cgt -clt -cle -clike -cnotlike -cmatch -cnotmatch -creplace -csplit -ccontains -cnotcontains
syn keyword ps1Operator -in -notin
syn keyword ps1Operator -is -isnot -as -join
syn keyword ps1Operator -and -or -not -xor -band -bor -bnot -bxor
syn keyword ps1Operator -f
syn match ps1Operator /!/
syn match ps1Operator /=/
syn match ps1Operator /+=/
syn match ps1Operator /-=/
syn match ps1Operator /\*=/
syn match ps1Operator /\/=/
syn match ps1Operator /%=/
syn match ps1Operator /+/
syn match ps1Operator /-\(\s\|\d\|\.\|\$\|(\)\@=/
syn match ps1Operator /\*/
syn match ps1Operator /\//
syn match ps1Operator /|/
syn match ps1Operator /%/
syn match ps1Operator /&/
syn match ps1Operator /::/
syn match ps1Operator /,/
syn match ps1Operator /\(^\|\s\)\@<=\. \@=/
" Regular Strings
" These aren't precisely correct and could use some work
syn region ps1String start=/"/ skip=/`"/ end=/"/ contains=@ps1StringSpecial,@Spell
syn region ps1String start=/'/ skip=/''/ end=/'/
" Here-Strings
syn region ps1String start=/@"$/ end=/^"@/ contains=@ps1StringSpecial,@Spell
syn region ps1String start=/@'$/ end=/^'@/
" Interpolation
syn match ps1Escape /`./
syn region ps1Interpolation matchgroup=ps1InterpolationDelimiter start="$(" end=")" contained contains=ALLBUT,@ps1NotTop
syn region ps1NestedParentheses start="(" skip="\\\\\|\\)" matchgroup=ps1Interpolation end=")" transparent contained
syn cluster ps1StringSpecial contains=ps1Escape,ps1Interpolation,ps1Variable,ps1Boolean,ps1Constant,ps1BuiltIn,@Spell
" Numbers
syn match ps1Number "\(\<\|-\)\@<=\(0[xX]\x\+\|\d\+\)\([KMGTP][B]\)\=\(\>\|-\)\@="
syn match ps1Number "\(\(\<\|-\)\@<=\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[dD]\="
syn match ps1Number "\<\d\+[eE][-+]\=\d\+[dD]\=\>"
syn match ps1Number "\<\d\+\([eE][-+]\=\d\+\)\=[dD]\>"
" Constants
syn match ps1Boolean "$\%(true\|false\)\>"
syn match ps1Constant /\$null\>/
syn match ps1BuiltIn "$^\|$?\|$_\|$\$"
syn match ps1BuiltIn "$\%(args\|error\|foreach\|home\|input\)\>"
syn match ps1BuiltIn "$\%(match\(es\)\?\|myinvocation\|host\|lastexitcode\)\>"
syn match ps1BuiltIn "$\%(ofs\|shellid\|stacktrace\)\>"
" Named Switch
syn match ps1Label /\s-\w\+/
" Folding blocks
if !exists('g:ps1_nofold_blocks')
syn region ps1Block start=/{/ end=/}/ transparent fold
endif
if !exists('g:ps1_nofold_region')
syn region ps1Region start=/#region/ end=/#endregion/ transparent fold keepend extend
endif
if !exists('g:ps1_nofold_sig')
syn region ps1Signature start=/# SIG # Begin signature block/ end=/# SIG # End signature block/ transparent fold
endif
" Setup default color highlighting
hi def link ps1Number Number
hi def link ps1Block Block
hi def link ps1Region Region
hi def link ps1Exception Exception
hi def link ps1Constant Constant
hi def link ps1String String
hi def link ps1Escape SpecialChar
hi def link ps1InterpolationDelimiter Delimiter
hi def link ps1Conditional Conditional
hi def link ps1Cmdlet Function
hi def link ps1Function Identifier
hi def link ps1Variable Identifier
hi def link ps1Boolean Boolean
hi def link ps1Constant Constant
hi def link ps1BuiltIn StorageClass
hi def link ps1Type Type
hi def link ps1ScopeModifier StorageClass
hi def link ps1Comment Comment
hi def link ps1CommentTodo Todo
hi def link ps1CommentDoc Tag
hi def link ps1CDocParam Identifier
hi def link ps1Operator Operator
hi def link ps1Repeat Repeat
hi def link ps1RepeatAndCmdlet Repeat
hi def link ps1Keyword Keyword
hi def link ps1KeywordAndCmdlet Keyword
hi def link ps1Label Label
let b:current_syntax = "ps1"

51
runtime/syntax/ps1xml.vim Normal file
View File

@ -0,0 +1,51 @@
" Vim syntax file
" Language: Windows PowerShell
" URL: https://github.com/PProvost/vim-ps1
" Last Change: 2013 Jun 24
if exists("b:current_syntax")
finish
endif
let s:ps1xml_cpo_save = &cpo
set cpo&vim
doau syntax xml
unlet b:current_syntax
syn case ignore
syn include @ps1xmlScriptBlock <sfile>:p:h/ps1.vim
unlet b:current_syntax
syn region ps1xmlScriptBlock
\ matchgroup=xmlTag start="<Script>"
\ matchgroup=xmlEndTag end="</Script>"
\ fold
\ contains=@ps1xmlScriptBlock
\ keepend
syn region ps1xmlScriptBlock
\ matchgroup=xmlTag start="<ScriptBlock>"
\ matchgroup=xmlEndTag end="</ScriptBlock>"
\ fold
\ contains=@ps1xmlScriptBlock
\ keepend
syn region ps1xmlScriptBlock
\ matchgroup=xmlTag start="<GetScriptBlock>"
\ matchgroup=xmlEndTag end="</GetScriptBlock>"
\ fold
\ contains=@ps1xmlScriptBlock
\ keepend
syn region ps1xmlScriptBlock
\ matchgroup=xmlTag start="<SetScriptBlock>"
\ matchgroup=xmlEndTag end="</SetScriptBlock>"
\ fold
\ contains=@ps1xmlScriptBlock
\ keepend
syn cluster xmlRegionHook add=ps1xmlScriptBlock
let b:current_syntax = "ps1xml"
let &cpo = s:ps1xml_cpo_save
unlet s:ps1xml_cpo_save

View File

@ -3049,7 +3049,7 @@ msgstr "-T <term>\tR
msgid "--not-a-term\t\tSkip warning for input/output not being a terminal"
msgstr ""
"--no-a-term\t\tAucun avertissement si l'entr<74>e/sortie n'est pas un terminal"
"--not-a-term\t\tAucun avertissement si l'entr<74>e/sortie n'est pas un terminal"
msgid "--ttyfail\t\tExit if input or output is not a terminal"
msgstr "--ttyfail\t\tQuitte si l'entr<74>e ou la sortie ne sont pas un terminal"