vim-patch:d592deb33652 (#19002)

Update runtime files
d592deb336
This commit is contained in:
Christian Clason 2022-06-17 20:38:21 +02:00 committed by GitHub
parent 98e2da7d50
commit e651ae5864
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 503 additions and 278 deletions

33
runtime/compiler/icon.vim Normal file
View File

@ -0,0 +1,33 @@
" Vim compiler file
" Compiler: Icon Compiler
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2022 Jun 16
if exists("current_compiler")
finish
endif
let current_compiler = "icont"
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
let s:cpo_save = &cpo
set cpo&vim
CompilerSet makeprg=icont\ -s
CompilerSet errorformat=%-G%\\d%\\+\ errors%\\=,
\%ERun-time\ error\ %n,
\%ERun-time\ error\ %n\ in\ %m,
\%ZTraceback:,
\%+Coffending\ value:\ %.%#,
\%CFile\ %f;\ Line\ %l,
\%EFile\ %f;\ Line\ %l\ #\ %m,
\%EFile\ %f;\ %m,
\%E%f:%l:\ #\ %m,
\%E%f:\ %m,
\%+C%.%#,
\%-G%.%#
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@ -7618,6 +7618,8 @@ strcharpart({src}, {start} [, {len}]) *strcharpart()*
strcharpart('abc', -1, 2)
< results in 'a'.
Returns an empty string on error.
Can also be used as a |method|: >
GetText()->strcharpart(5)
@ -7627,6 +7629,9 @@ strchars({string} [, {skipcc}]) *strchars()*
When {skipcc} is omitted or zero, composing characters are
counted separately.
When {skipcc} set to 1, Composing characters are ignored.
Returns zero on error.
Also see |strlen()|, |strdisplaywidth()| and |strwidth()|.
{skipcc} is only available after 7.4.755. For backward
@ -7659,6 +7664,7 @@ strdisplaywidth({string} [, {col}]) *strdisplaywidth()*
'tabstop' and 'display'.
When {string} contains characters with East Asian Width Class
Ambiguous, this function's return value depends on 'ambiwidth'.
Returns zero on error.
Also see |strlen()|, |strwidth()| and |strchars()|.
Can also be used as a |method|: >
@ -7690,6 +7696,7 @@ strgetchar({str}, {index}) *strgetchar()*
index. Composing characters are considered separate
characters here. Use |nr2char()| to convert the Number to a
String.
Returns -1 if {index} is invalid.
Also see |strcharpart()| and |strchars()|.
Can also be used as a |method|: >
@ -7748,7 +7755,7 @@ strlen({string}) *strlen()*
The result is a Number, which is the length of the String
{string} in bytes.
If the argument is a Number it is first converted to a String.
For other types an error is given.
For other types an error is given and zero is returned.
If you want to count the number of multibyte characters use
|strchars()|.
Also see |len()|, |strdisplaywidth()| and |strwidth()|.
@ -7779,6 +7786,8 @@ strpart({src}, {start} [, {len} [, {chars}]]) *strpart()*
example, to get the character under the cursor: >
strpart(getline("."), col(".") - 1, 1, v:true)
<
Returns an empty string on error.
Can also be used as a |method|: >
GetText()->strpart(5)
@ -7838,6 +7847,8 @@ strtrans({string}) *strtrans()*
< This displays a newline in register a as "^@" instead of
starting a new line.
Returns an empty string on error.
Can also be used as a |method|: >
GetString()->strtrans()
@ -7847,6 +7858,7 @@ strwidth({string}) *strwidth()*
cell, alternatively use |strdisplaywidth()|.
When {string} contains characters with East Asian Width Class
Ambiguous, this function's return value depends on 'ambiwidth'.
Returns zero on error.
Also see |strlen()|, |strdisplaywidth()| and |strchars()|.
Can also be used as a |method|: >
@ -7872,6 +7884,8 @@ submatch({nr} [, {list}]) *submatch()* *E935*
When substitute() is used recursively only the submatches in
the current (deepest) call can be obtained.
Returns an empty string or list on error.
Examples: >
:s/\d\+/\=submatch(0) + 1/
:echo substitute(text, '\d\+', '\=submatch(0) + 1', '')
@ -7922,7 +7936,9 @@ substitute({string}, {pat}, {sub}, {flags}) *substitute()*
|submatch()| returns. Example: >
:echo substitute(s, '%\(\x\x\)', {m -> '0x' .. m[1]}, 'g')
< Can also be used as a |method|: >
< Returns an empty string on error.
Can also be used as a |method|: >
GetString()->substitute(pat, sub, flags)
swapinfo({fname}) *swapinfo()*
@ -7976,6 +7992,8 @@ synID({lnum}, {col}, {trans}) *synID()*
Warning: This function can be very slow. Best speed is
obtained by going through the file in forward direction.
Returns zero on error.
Example (echoes the name of the syntax item under the cursor): >
:echo synIDattr(synID(line("."), col("."), 1), "name")
<
@ -8018,6 +8036,8 @@ synIDattr({synID}, {what} [, {mode}]) *synIDattr()*
cursor): >
:echo synIDattr(synIDtrans(synID(line("."), col("."), 1)), "fg")
<
Returns an empty string on error.
Can also be used as a |method|: >
:echo synID(line("."), col("."), 1)->synIDtrans()->synIDattr("fg")
@ -8027,6 +8047,8 @@ synIDtrans({synID}) *synIDtrans()*
highlight the character. Highlight links given with
":highlight link" are followed.
Returns zero on error.
Can also be used as a |method|: >
:echo synID(line("."), col("."), 1)->synIDtrans()->synIDattr("fg")
@ -8071,7 +8093,7 @@ synstack({lnum}, {col}) *synstack()*
echo synIDattr(id, "name")
endfor
< When the position specified with {lnum} and {col} is invalid
nothing is returned. The position just after the last
an empty list is returned. The position just after the last
character in a line and the first column in an empty line are
valid positions.
@ -8170,6 +8192,8 @@ tabpagenr([{arg}]) *tabpagenr()*
previous tab page, 0 is returned.
The number can be used with the |:tab| command.
Returns zero on error.
tabpagewinnr({tabarg} [, {arg}]) *tabpagewinnr()*
Like |winnr()| but for tab page {tabarg}.
{tabarg} specifies the number of tab page to be used.
@ -8262,6 +8286,7 @@ tan({expr}) *tan()*
Return the tangent of {expr}, measured in radians, as a |Float|
in the range [-inf, inf].
{expr} must evaluate to a |Float| or a |Number|.
Returns 0.0 if {expr} is not a |Float| or a |Number|.
Examples: >
:echo tan(10)
< 0.648361 >
@ -8275,6 +8300,7 @@ tanh({expr}) *tanh()*
Return the hyperbolic tangent of {expr} as a |Float| in the
range [-1, 1].
{expr} must evaluate to a |Float| or a |Number|.
Returns 0.0 if {expr} is not a |Float| or a |Number|.
Examples: >
:echo tanh(0.5)
< 0.462117 >
@ -8338,6 +8364,8 @@ timer_start({time}, {callback} [, {options}])
If the timer causes an error three times in a
row the repeat is cancelled.
Returns -1 on error.
Example: >
func MyHandler(timer)
echo 'Handler called'
@ -8367,7 +8395,7 @@ timer_stopall() *timer_stopall()*
tolower({expr}) *tolower()*
The result is a copy of the String given, with all uppercase
characters turned into lowercase (just like applying |gu| to
the string).
the string). Returns an empty string on error.
Can also be used as a |method|: >
GetText()->tolower()
@ -8375,7 +8403,7 @@ tolower({expr}) *tolower()*
toupper({expr}) *toupper()*
The result is a copy of the String given, with all lowercase
characters turned into uppercase (just like applying |gU| to
the string).
the string). Returns an empty string on error.
Can also be used as a |method|: >
GetText()->toupper()
@ -8388,6 +8416,8 @@ tr({src}, {fromstr}, {tostr}) *tr()*
and so on. Exactly like the unix "tr" command.
This code also deals with multibyte characters properly.
Returns an empty string on error.
Examples: >
echo tr("hello there", "ht", "HT")
< returns "Hello THere" >
@ -8410,6 +8440,8 @@ trim({text} [, {mask} [, {dir}]]) *trim()*
2 remove only at the end of {text}
When omitted both ends are trimmed.
This function deals with multibyte characters properly.
Returns an empty string on error.
Examples: >
echo trim(" some text ")
< returns "some text" >
@ -8427,6 +8459,7 @@ trunc({expr}) *trunc()*
Return the largest integral value with magnitude less than or
equal to {expr} as a |Float| (truncate towards zero).
{expr} must evaluate to a |Float| or a |Number|.
Returns 0.0 if {expr} is not a |Float| or a |Number|.
Examples: >
echo trunc(1.456)
< 1.0 >
@ -8533,12 +8566,15 @@ uniq({list} [, {func} [, {dict}]]) *uniq()* *E882*
< The default compare function uses the string representation of
each item. For the use of {func} and {dict} see |sort()|.
Returns zero if {list} is not a |List|.
Can also be used as a |method|: >
mylist->uniq()
values({dict}) *values()*
Return a |List| with all the values of {dict}. The |List| is
in arbitrary order. Also see |items()| and |keys()|.
Returns zero if {dict} is not a |Dict|.
Can also be used as a |method|: >
mydict->values()
@ -8667,7 +8703,7 @@ win_gettype([{nr}]) *win_gettype()*
"command" command-line window |cmdwin|
(empty) normal window
"loclist" |location-list-window|
"popup" popup window |popup|
"popup" floating window |api-floatwin|
"preview" preview window |preview-window|
"quickfix" |quickfix-window|
"unknown" window {nr} not found
@ -8676,9 +8712,7 @@ win_gettype([{nr}]) *win_gettype()*
When {nr} is given return the type of this window by number or
|window-ID|.
Also see the 'buftype' option. When running a terminal in a
popup window then 'buftype' is "terminal" and win_gettype()
returns "popup".
Also see the 'buftype' option.
Can also be used as a |method|: >
GetWinid()->win_gettype()
@ -8717,6 +8751,8 @@ win_move_separator({nr}, {offset}) *win_move_separator()*
specified (e.g., as a consequence of maintaining
'winminwidth'). Returns TRUE if the window can be found and
FALSE otherwise.
This will fail for the rightmost window and a full-width
window, since it has no separator on the right.
Can also be used as a |method|: >
GetWinnr()->win_move_separator(offset)

View File

@ -1136,8 +1136,8 @@ save the command-line history and read it back later.
If the 'wildchar' option is set to <Tab>, and the command-line window is used
for an Ex command, then two mappings will be added to use <Tab> for completion
in the command-line window, like this: >
:imap <buffer> <Tab> <C-X><C-V>
:nmap <buffer> <Tab> a<C-X><C-V>
:inoremap <buffer> <Tab> <C-X><C-V>
:nnoremap <buffer> <Tab> a<C-X><C-V>
Note that hitting <Tab> in Normal mode will do completion on the next
character. That way it works at the end of the line.
If you don't want these mappings, disable them with: >

View File

@ -345,9 +345,15 @@ Note:
mapping is recursive.
- In Visual mode you can use `line('v')` and `col('v')` to get one end of the
Visual area, the cursor is at the other end.
- In select-mode, |:map| and |:vmap| command mappings are executed in
visual-mode. Use |:smap| to handle select-mode.
- In Select mode, |:map| and |:vmap| command mappings are executed in
Visual mode. Use |:smap| to handle Select mode differently. One particular
edge case: >
:vnoremap <C-K> <Esc>
< This ends Visual mode when in Visual mode, but in Select mode it does not
work, because Select mode is restored after executing the mapped keys. You
need to use: >
:snoremap <C-K> <Esc>
<
*E5520*
<Cmd> commands must terminate, that is, they must be followed by <CR> in the
{rhs} of the mapping definition. |Command-line| mode is never entered.

View File

@ -440,11 +440,11 @@ settings are described below, in |netrw-browser-options|, and in
*g:netrw_use_errorwindow* =2: messages from netrw will use a popup window
Move the mouse and pause to remove the popup window.
(default value if popup windows are availble)
(default value if popup windows are available)
=1 : messages from netrw will use a separate one
line window. This window provides reliable
delivery of messages.
(default value if popup windows are not availble)
(default value if popup windows are not available)
=0 : messages from netrw will use echoerr ;
messages don't always seem to show up this
way, but one doesn't have to quit the window.
@ -1198,7 +1198,7 @@ If there are marked files and/or directories, mb will add them to the bookmark
list.
*netrw-:NetrwMB*
Addtionally, one may use :NetrwMB to bookmark files or directories. >
Additionally, one may use :NetrwMB to bookmark files or directories. >
:NetrwMB[!] [files/directories]

36
runtime/ftplugin/icon.vim Normal file
View File

@ -0,0 +1,36 @@
" Vim filetype plugin file
" Language: Icon
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2022 Jun 16
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal comments=:#
setlocal commentstring=#\ %s
setlocal formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = "setl fo< com< cms<"
if exists("loaded_matchit")
" let b:match_ignorecase = 0
let b:match_words = '^\s*$\s*if\(def\|ndef\)\=\>:^\s*$\s*elif\>:^\s*$\s*else\>:^\s*$\s*endif\>,' .
\ '\<procedure\>:\<\%(initial\|return\|suspend\|fail\)\>:\<end\>'
let b:undo_ftplugin ..= " | unlet! b:match_words"
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Icon Source Files (*.icn)\t*.icn\n" .
\ "All Files (*.*)\t*.*\n"
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8

View File

@ -4,6 +4,12 @@
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Last Change: 24 Sep 2021
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal indentexpr=GetDTDIndent()
setlocal indentkeys=!^F,o,O,>
setlocal nosmartindent

View File

@ -2,9 +2,15 @@
" Language: Julia
" Maintainer: Carlo Baldassi <carlobaldassi@gmail.com>
" Homepage: https://github.com/JuliaEditorSupport/julia-vim
" Last Change: 2016 jun 16
" Last Change: 2022 Jun 14
" Notes: originally based on Bram Molenaar's indent file for vim
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal autoindent
setlocal indentexpr=GetJuliaIndent()

View File

@ -6,104 +6,178 @@
" License: Vim License (see :help license)
" Last Change: 2021 Sep 24
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
" Suggestions and improvements by :
" Aaron J. Sherman (use syntax for hints)
" Artem Chuprina (play nice with folding)
" Make sure the continuation lines below do not cause problems in
" compatibility mode.
let s:save_cpo = &cpo
" TODO things that are not or not properly indented (yet) :
" - Continued statements
" print "foo",
" "bar";
" print "foo"
" if bar();
" - Multiline regular expressions (m//x)
" (The following probably needs modifying the perl syntax file)
" - qw() lists
" - Heredocs with terminators that don't match \I\i*
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
" Is syntax highlighting active ?
let b:indent_use_syntax = has("syntax")
setlocal indentexpr=GetPerlIndent()
setlocal indentkeys+=0=,0),0],0=or,0=and
if !b:indent_use_syntax
setlocal indentkeys+=0=EO
endif
let b:undo_indent = "setl inde< indk<"
let s:cpo_save = &cpo
set cpo-=C
setlocal formatoptions-=t
setlocal formatoptions+=crqol
setlocal keywordprg=perldoc\ -f
function! GetPerlIndent()
setlocal comments=:#
setlocal commentstring=#%s
" Get the line to be indented
let cline = getline(v:lnum)
" Provided by Ned Konz <ned at bike-nomad dot com>
"---------------------------------------------
setlocal include=\\<\\(use\\\|require\\)\\>
" '+' is removed to support plugins in Catalyst or DBIx::Class
" where the leading plus indicates a fully-qualified module name.
setlocal includeexpr=substitute(substitute(substitute(substitute(v:fname,'+','',''),'::','/','g'),'->\*','',''),'$','.pm','')
setlocal define=[^A-Za-z_]
setlocal iskeyword+=:
" The following line changes a global variable but is necessary to make
" gf and similar commands work. Thanks to Andrew Pimlott for pointing
" out the problem.
let s:old_isfname = &isfname
set isfname+=:
let s:new_isfname = &isfname
augroup perl_global_options
au!
exe "au BufEnter * if &filetype == 'perl' | let &isfname = '" . s:new_isfname . "' | endif"
exe "au BufLeave * if &filetype == 'perl' | let &isfname = '" . s:old_isfname . "' | endif"
augroup END
" Undo the stuff we changed.
let b:undo_ftplugin = "setlocal fo< kp< com< cms< inc< inex< def< isk<" .
\ " | let &isfname = '" . s:old_isfname . "'"
if get(g:, 'perl_fold', 0)
setlocal foldmethod=syntax
let b:undo_ftplugin .= " | setlocal fdm<"
endif
" Set this once, globally.
if !exists("perlpath")
if executable("perl")
try
if &shellxquote != '"'
let perlpath = system('perl -e "print join(q/,/,@INC)"')
else
let perlpath = system("perl -e 'print join(q/,/,@INC)'")
endif
let perlpath = substitute(perlpath,',.$',',,','')
catch /E145:/
let perlpath = ".,,"
endtry
else
" If we can't call perl to get its path, just default to using the
" current directory and the directory of the current file.
let perlpath = ".,,"
" Indent POD markers to column 0
if cline =~ '^\s*=\L\@!'
return 0
endif
endif
" Append perlpath to the existing path value, if it is set. Since we don't
" use += to do it because of the commas in perlpath, we have to handle the
" global / local settings, too.
if &l:path == ""
if &g:path == ""
let &l:path=perlpath
else
let &l:path=&g:path.",".perlpath
" Get current syntax item at the line's first char
let csynid = ''
if b:indent_use_syntax
let csynid = synIDattr(synID(v:lnum,1,0),"name")
endif
else
let &l:path=&l:path.",".perlpath
endif
let b:undo_ftplugin .= " | setlocal pa<"
"---------------------------------------------
" Don't reindent POD and heredocs
if csynid == "perlPOD" || csynid == "perlHereDoc" || csynid =~ "^pod"
return indent(v:lnum)
endif
" Change the browse dialog to show mainly Perl-related files
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Perl Source Files (*.pl)\t*.pl\n" .
\ "Perl Modules (*.pm)\t*.pm\n" .
\ "Perl Documentation Files (*.pod)\t*.pod\n" .
\ "All Files (*.*)\t*.*\n"
let b:undo_ftplugin .= " | unlet! b:browsefilter"
endif
" Indent end-of-heredocs markers to column 0
if b:indent_use_syntax
" Assumes that an end-of-heredoc marker matches \I\i* to avoid
" confusion with other types of strings
if csynid == "perlStringStartEnd" && cline =~ '^\I\i*$'
return 0
endif
else
" Without syntax hints, assume that end-of-heredocs markers begin with EO
if cline =~ '^\s*EO'
return 0
endif
endif
" Proper matching for matchit plugin
if exists("loaded_matchit") && !exists("b:match_words")
let b:match_skip = 's:comment\|string\|perlQQ\|perlShellCommand\|perlHereDoc\|perlSubstitution\|perlTranslation\|perlMatch\|perlFormatField'
let b:match_words = '\<if\>:\<elsif\>:\<else\>'
let b:undo_ftplugin .= " | unlet! b:match_words b:match_skip"
endif
" Now get the indent of the previous perl line.
" Restore the saved compatibility options.
let &cpo = s:save_cpo
unlet s:save_cpo s:old_isfname s:new_isfname
" Find a non-blank line above the current line.
let lnum = prevnonblank(v:lnum - 1)
" Hit the start of the file, use zero indent.
if lnum == 0
return 0
endif
let line = getline(lnum)
let ind = indent(lnum)
" Skip heredocs, POD, and comments on 1st column
if b:indent_use_syntax
let skippin = 2
while skippin
let synid = synIDattr(synID(lnum,1,0),"name")
if (synid == "perlStringStartEnd" && line =~ '^\I\i*$')
\ || (skippin != 2 && synid == "perlPOD")
\ || (skippin != 2 && synid == "perlHereDoc")
\ || synid == "perlComment"
\ || synid =~ "^pod"
let lnum = prevnonblank(lnum - 1)
if lnum == 0
return 0
endif
let line = getline(lnum)
let ind = indent(lnum)
let skippin = 1
else
let skippin = 0
endif
endwhile
else
if line =~ "^EO"
let lnum = search("<<[\"']\\=EO", "bW")
let line = getline(lnum)
let ind = indent(lnum)
endif
endif
" Indent blocks enclosed by {}, (), or []
if b:indent_use_syntax
" Find a real opening brace
" NOTE: Unlike Perl character classes, we do NOT need to escape the
" closing brackets with a backslash. Doing so just puts a backslash
" in the character class and causes sorrow. Instead, put the closing
" bracket as the first character in the class.
let braceclass = '[][(){}]'
let bracepos = match(line, braceclass, matchend(line, '^\s*[])}]'))
while bracepos != -1
let synid = synIDattr(synID(lnum, bracepos + 1, 0), "name")
" If the brace is highlighted in one of those groups, indent it.
" 'perlHereDoc' is here only to handle the case '&foo(<<EOF)'.
if synid == ""
\ || synid == "perlMatchStartEnd"
\ || synid == "perlHereDoc"
\ || synid == "perlBraces"
\ || synid == "perlStatementIndirObj"
\ || synid =~ "^perlFiledescStatement"
\ || synid =~ '^perl\(Sub\|Block\|Package\)Fold'
let brace = strpart(line, bracepos, 1)
if brace == '(' || brace == '{' || brace == '['
let ind = ind + shiftwidth()
else
let ind = ind - shiftwidth()
endif
endif
let bracepos = match(line, braceclass, bracepos + 1)
endwhile
let bracepos = matchend(cline, '^\s*[])}]')
if bracepos != -1
let synid = synIDattr(synID(v:lnum, bracepos, 0), "name")
if synid == ""
\ || synid == "perlMatchStartEnd"
\ || synid == "perlBraces"
\ || synid == "perlStatementIndirObj"
\ || synid =~ '^perl\(Sub\|Block\|Package\)Fold'
let ind = ind - shiftwidth()
endif
endif
else
if line =~ '[{[(]\s*\(#[^])}]*\)\=$'
let ind = ind + shiftwidth()
endif
if cline =~ '^\s*[])}]'
let ind = ind - shiftwidth()
endif
endif
" Indent lines that begin with 'or' or 'and'
if cline =~ '^\s*\(or\|and\)\>'
if line !~ '^\s*\(or\|and\)\>'
let ind = ind + shiftwidth()
endif
elseif line =~ '^\s*\(or\|and\)\>'
let ind = ind - shiftwidth()
endif
return ind
endfunction
let &cpo = s:cpo_save
unlet s:cpo_save
" vim:ts=8:sts=4:sw=4:expandtab:ft=vim

View File

@ -1,7 +1,7 @@
" Vim syntax file
" Language: Coco/R
" Maintainer: Ashish Shukla <wahjava@gmail.com>
" Last Change: 2007 Aug 10
" Last Change: 2022 Jun 14
" Remark: Coco/R syntax partially implemented.
" License: Vim license
@ -30,3 +30,4 @@ hi def link cocoOperator Operator
hi def link cocoProductionCode Statement
hi def link cocoPragma Special
let b:current_syntax = 'coco'

View File

@ -6,7 +6,7 @@
" Description: display directory content inside Vim with syntax
" highlighting
" File: runtime/syntax/dirpager.vim
" Last Change: 2012 May 19
" Last Change: 2022 Jun 14
" Modeline: vim: ts=8:sw=2:sts=2:
"
" Credits: dirpager.vim is derived from Nikolai Weibulls dircolors.vim

View File

@ -1,11 +1,12 @@
" Vim syntax file
" Language: dts/dtsi (device tree files)
" Maintainer: Daniel Mack <vim@zonque.org>
" Last Change: 2021 May 15
" Last Change: 2022 Jun 14
if exists("b:current_syntax")
finish
endif
let b:current_syntax = 'dts'
syntax region dtsComment start="/\*" end="\*/"
syntax match dtsReference "&[[:alpha:][:digit:]_]\+"

View File

@ -1,199 +1,211 @@
" Vim syntax file
" Language: Icon
" Maintainer: Wendell Turner <wendell@adsi-m4.com>
" URL: ftp://ftp.halcyon.com/pub/users/wturner/icon.vim
" Last Change: 2003 May 11
" Language: Icon
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Wendell Turner <wendell@adsi-m4.com> (invalid last known address)
" Last Change: 2022 Jun 16
" Contributor: eschen@alumni.princeton.edu 2002.09.18
" quit when a syntax file was already loaded
" Prelude {{{1
if exists("b:current_syntax")
finish
endif
syn keyword iconFunction abs acos any args asin atan bal
syn keyword iconFunction callout center char chdir close collect copy
syn keyword iconFunction cos cset delay delete detab display dtor
syn keyword iconFunction entab errorclear exit exp find flush function
syn keyword iconFunction get getch getche getenv iand icom image
syn keyword iconFunction insert integer ior ishift ixor kbhit key
syn keyword iconFunction left list loadfunc log many map match
syn keyword iconFunction member move name numeric open ord pop
syn keyword iconFunction pos proc pull push put read reads
syn keyword iconFunction real remove rename repl reverse right rtod
syn keyword iconFunction runerr save seek seq set sin sort
syn keyword iconFunction sortf sqrt stop string system tab table
syn keyword iconFunction tan trim type upto variable where write writes
syn iskeyword @,48-57,_,192-255,&
" Keywords
syn match iconKeyword "&allocated"
syn match iconKeyword "&ascii"
syn match iconKeyword "&clock"
syn match iconKeyword "&collections"
syn match iconKeyword "&cset"
syn match iconKeyword "&current"
syn match iconKeyword "&date"
syn match iconKeyword "&dateline"
syn match iconKeyword "&digits"
syn match iconKeyword "&dump"
syn match iconKeyword "&e"
syn match iconKeyword "&error"
syn match iconKeyword "&errornumber"
syn match iconKeyword "&errortext"
syn match iconKeyword "&errorvalue"
syn match iconKeyword "&errout"
syn match iconKeyword "&fail"
syn match iconKeyword "&features"
syn match iconKeyword "&file"
syn match iconKeyword "&host"
syn match iconKeyword "&input"
syn match iconKeyword "&lcase"
syn match iconKeyword "&letters"
syn match iconKeyword "&level"
syn match iconKeyword "&line"
syn match iconKeyword "&main"
syn match iconKeyword "&null"
syn match iconKeyword "&output"
syn match iconKeyword "&phi"
syn match iconKeyword "&pi"
syn match iconKeyword "&pos"
syn match iconKeyword "&progname"
syn match iconKeyword "&random"
syn match iconKeyword "&regions"
syn match iconKeyword "&source"
syn match iconKeyword "&storage"
syn match iconKeyword "&subject"
syn match iconKeyword "&time"
syn match iconKeyword "&trace"
syn match iconKeyword "&ucase"
syn match iconKeyword "&version"
" Not Top {{{1
syn cluster iconNotTop contains=iconDocField,iconIncluded,iconStringSpecial,iconTodo,@Spell
" Reserved words
syn keyword iconReserved break by case create default do
syn keyword iconReserved else end every fail if
syn keyword iconReserved initial link next not of
syn keyword iconReserved procedure repeat return suspend
syn keyword iconReserved then to until while
" Storage class reserved words
syn keyword iconStorageClass global static local record
syn keyword iconTodo contained TODO FIXME XXX BUG
" String and Character constants
" Highlight special characters (those which have a backslash) differently
syn match iconSpecial contained "\\x\x\{2}\|\\\o\{3\}\|\\[bdeflnrtv\"\'\\]\|\\^c[a-zA-Z0-9]\|\\$"
syn region iconString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=iconSpecial
syn region iconCset start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=iconSpecial
syn match iconCharacter "'[^\\]'"
" not sure about these
"syn match iconSpecialCharacter "'\\[bdeflnrtv]'"
"syn match iconSpecialCharacter "'\\\o\{3\}'"
"syn match iconSpecialCharacter "'\\x\x\{2}'"
"syn match iconSpecialCharacter "'\\^c\[a-zA-Z0-9]'"
"when wanted, highlight trailing white space
" Whitespace errors {{{1
if exists("icon_space_errors")
syn match iconSpaceError "\s*$"
syn match iconSpaceError " \+\t"me=e-1
if !exists("icon_no_trail_space_error")
syn match iconSpaceError "\s\+$" display excludenl
endif
if !exists("icon_no_tab_space_error")
syn match iconSpaceError " \+\t"me=e-1 display
endif
endif
"catch errors caused by wrong parenthesis
syn cluster iconParenGroup contains=iconParenError,iconIncluded,iconSpecial,iconTodo,iconUserCont,iconUserLabel,iconBitField
" Reserved words {{{1
syn keyword iconReserved break by case create default do else every fail if
syn keyword iconReserved initial next not of repeat return suspend then to
syn keyword iconReserved until while
syn region iconParen transparent start='(' end=')' contains=ALLBUT,@iconParenGroup
syn match iconParenError ")"
syn match iconInParen contained "[{}]"
syn keyword iconStorageClass global static local record invocable
syn keyword iconLink link
" Procedure definitions {{{1
if exists("icon_no_procedure_fold")
syn region iconProcedure matchgroup=iconReserved start="\<procedure\>" end="\<end\>" contains=ALLBUT,@iconNotTop
else
syn region iconProcedure matchgroup=iconReserved start="\<procedure\>" end="\<end\>" contains=ALLBUT,@iconNotTop fold
endif
" Keywords {{{1
syn keyword iconKeyword &allocated &ascii &clock &collections &cset &current
syn keyword iconKeyword &date &dateline &digits &dump &e &error &errornumber
syn keyword iconKeyword &errortext &errorvalue &errout &fail &features &file
syn keyword iconKeyword &host &input &lcase &letters &level &line &main &null
syn keyword iconKeyword &output &phi &pi &pos &progname &random &regions
syn keyword iconKeyword &source &storage &subject &time &trace &ucase &version
" Graphics keywords
syn keyword iconKeyword &col &control &interval &ldrag &lpress &lrelease
syn keyword iconKeyword &mdrag &meta &mpress &mrelease &rdrag &resize &row
syn keyword iconKeyword &rpress &rrelease &shift &window &x &y
" Functions {{{1
syn keyword iconFunction abs acos any args asin atan bal callout center char
syn keyword iconFunction chdir close collect copy cos cset delay delete detab
syn keyword iconFunction display dtor entab errorclear exit exp find flush
syn keyword iconFunction function get getch getche getenv iand icom image
syn keyword iconFunction insert integer ior ishift ixor kbhit key left list
syn keyword iconFunction loadfunc log many map match member move name numeric
syn keyword iconFunction open ord pop pos proc pull push put read reads real
syn keyword iconFunction remove rename repl reverse right rtod runerr save
syn keyword iconFunction seek self seq serial set sin sort sortf sqrt stop
syn keyword iconFunction string system tab table tan trim type upto variable
syn keyword iconFunction where write writes
" Graphics functions
syn keyword iconFunction Active Alert Bg CenterString Clip Clone Color
syn keyword iconFunction ColorDialog ColorValue CopyArea Couple DrawArc
syn keyword iconFunction DrawCircle DrawCurve DrawImage DrawLine DrawPoint
syn keyword iconFunction DrawPolygon DrawRectangle DrawSegment DrawString
syn keyword iconFunction Enqueue EraseArea Event Fg FillArc FillCircle
syn keyword iconFunction FillPolygon FillRectangle Font FreeColor GotoRC
syn keyword iconFunction GotoXY LeftString Lower NewColor Notice OpenDialog
syn keyword iconFunction PaletteChars PaletteColor PaletteGrays PaletteKey
syn keyword iconFunction Pattern Pending Pixel Raise ReadImage RightString
syn keyword iconFunction SaveDialog SelectDialog Shade TextDialog TextWidth
syn keyword iconFunction ToggleDialog Uncouple WAttrib WClose WDefault WDelay
syn keyword iconFunction WDone WFlush WOpen WQuit WRead WReads WriteImage
syn keyword iconFunction WSync WWrite WWrites
" String and character constants {{{1
syn match iconStringSpecial "\\x\x\{2}\|\\\o\{3\}\|\\[bdeflnrtv\"\'\\]\|\\^[a-zA-Z0-9]" contained
syn match iconStringSpecial "\\$" contained
syn match iconStringSpecial "_\ze\s*$" contained
syn region iconString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=iconStringSpecial
syn region iconCset start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=iconStringSpecial
" Bracket errors {{{1
if !exists("icon_no_bracket_errors")
" catch errors caused by wrong brackets (ACE 2002.09.18)
syn cluster iconBracketGroup contains=iconBracketError,iconIncluded
syn region iconBracket start='\[' end='\]' contains=ALLBUT,@iconBracketGroup,@iconNotTop transparent
syn match iconBracketError "]"
"catch errors caused by wrong braces (ACE 2002.09.18)
syn cluster iconBraceGroup contains=iconBraceError,iconIncluded
syn region iconBrace start='{' end='}' contains=ALLBUT,@iconBraceGroup,@iconNotTop transparent
syn match iconBraceError "}"
"catch errors caused by wrong parenthesis
syn cluster iconParenGroup contains=iconParenError,iconIncluded
syn region iconParen start='(' end=')' contains=ALLBUT,@iconParenGroup,@iconNotTop transparent
syn match iconParenError ")"
end
" Numbers {{{1
syn case ignore
"integer number, or floating point number without a dot
syn match iconNumber "\<\d\+\>"
" integer
syn match iconInteger "\<\d\+\>"
syn match iconInteger "\<\d\{1,2}[rR][a-zA-Z0-9]\+\>"
"floating point number, with dot, optional exponent
syn match iconFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=\>"
" real with trailing dot
syn match iconReal "\<\d\+\."
"floating point number, starting with a dot, optional exponent
syn match iconFloat "\.\d\+\(e[-+]\=\d\+\)\=\>"
" real, with dot, optional exponent
syn match iconReal "\<\d\+\.\d*\%(e[-+]\=\d\+\)\=\>"
"floating point number, without dot, with exponent
syn match iconFloat "\<\d\+e[-+]\=\d\+\>"
" real, with leading dot, optional exponent
syn match iconReal "\.\d\+\%(e[-+]\=\d\+\)\=\>"
"radix number
syn match iconRadix "\<\d\{1,2}[rR][a-zA-Z0-9]\+\>"
" real, without dot, with exponent
syn match iconReal "\<\d\+e[-+]\=\d\+\>"
" syn match iconIdentifier "\<[a-z_][a-z0-9_]*\>"
syn cluster iconNumber contains=iconInteger,iconReal
syn case match
" Comment
syn match iconComment "#.*" contains=iconTodo,iconSpaceError
" Comments {{{1
syn keyword iconTodo TODO FIXME XXX BUG contained
syn match iconComment "#.*" contains=iconTodo,iconSpaceError,@Spell
syn match iconDocField "^#\s\+\zs\%(File\|Subject\|Authors\=\|Date\|Version\|Links\|Requires\|See also\):" contained
syn region iconPreCondit start="^\s*$\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=iconComment,iconString,iconCharacter,iconNumber,iconCommentError,iconSpaceError
if exists("icon_no_comment_fold")
syn region iconDocumentation start="\%^#\{2,}\%(\n#\+\%(\s\+.*\)\=\)\+" end="^#\+\n\s*$" contains=iconDocField keepend
else
syn region iconMultilineComment start="^\s*#.*\n\%(^\s*#\)\@=" end="^\s*#.*\n\%(^\s*#\)\@!" contains=iconComment keepend fold transparent
syn region iconDocumentation start="\%^#\{2,}\%(\n#\)\+" end="^#\+\n\%([^#]\|$\)" contains=iconDocField keepend fold
endif
syn region iconIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+
syn match iconIncluded contained "<[^>]*>"
syn match iconInclude "^\s*$\s*include\>\s*["<]" contains=iconIncluded
"syn match iconLineSkip "\\$"
" Preprocessor {{{1
syn match iconPreInclude '^\s*\zs$\s*include\>\ze\s*"' nextgroup=iconIncluded skipwhite
syn match iconIncluded '"[^"]\+"' contained
syn cluster iconPreProcGroup contains=iconPreCondit,iconIncluded,iconInclude,iconDefine,iconInParen,iconUserLabel
syn region iconPreDefine start="^\s*\zs$\s*\%(define\|undef\)\>" end="$" oneline contains=ALLBUT,@iconPreGroup
syn region iconPreProc start="^\s*\zs$\s*\%(error\|line\)\>" end="$" oneline contains=ALLBUT,@iconPreGroup
syn region iconPreConditional start="^\s*\zs$\s*\%(if\|ifdef\|ifndef\|elif\|else\|endif\)\>" end="$" oneline contains=iconComment,iconString,iconCset,iconNumber,iconSpaceError
syn region iconDefine start="^\s*$\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,@iconPreProcGroup
syn cluster iconPreGroup contains=iconPreCondit,iconPreInclude,iconIncluded,iconPreDefine
"wt:syn region iconPreProc "start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" "end="$" contains=ALLBUT,@iconPreProcGroup
" Highlight User Labels
" syn cluster iconMultiGroup contains=iconIncluded,iconSpecial,iconTodo,iconUserCont,iconUserLabel,iconBitField
syn match iconPreSymbol "_V\d\+"
syn keyword iconPreSymbol _ACORN _AMIGA _ARM_FUNCTIONS _ASCII _CALLING
syn keyword iconPreSymbol _CO_EXPRESSIONS _COMPILED _DIRECT_EXECUTION
syn keyword iconPreSymbol _DOS_FUNCTIONS _EBCDIC _EVENT_MONITOR
syn keyword iconPreSymbol _EXECUTABLE_IMAGES _EXTERNAL_FUNCTIONS
syn keyword iconPreSymbol _EXTERNAL_VALUES _INTERPRETED _KEYBOARD_FUNCTIONS
syn keyword iconPreSymbol _LARGE_INTEGERS _MACINTOSH _MEMORY_MONITOR _MSDOS
syn keyword iconPreSymbol _MSDOS_386 _MULTIREGION _MULTITASKING _OS2 _PIPES
syn keyword iconPreSymbol _PORT _PRESENTATION_MGR _RECORD_IO _STRING_INVOKE
syn keyword iconPreSymbol _SYSTEM_FUNCTION _UNIX _VISUALIZATION _VMS
syn keyword iconPreSymbol _WINDOW_FUNCTIONS _X_WINDOW_SYSTEM
" Syncing {{{1
if !exists("icon_minlines")
let icon_minlines = 15
let icon_minlines = 250
endif
exec "syn sync ccomment iconComment minlines=" . icon_minlines
" Define the default highlighting.
" Default Highlighting {{{1
" Only when an item doesn't have highlighting
hi def link iconParenError iconError
hi def link iconBracketError iconError
hi def link iconBraceError iconError
hi def link iconSpaceError iconError
hi def link iconError Error
" The default methods for highlighting. Can be overridden later
hi def link iconInteger Number
hi def link iconReal Float
hi def link iconString String
hi def link iconCset String
hi def link iconStringSpecial SpecialChar
" hi def link iconSpecialCharacter iconSpecial
hi def link iconOctalError iconError
hi def link iconParenError iconError
hi def link iconInParen iconError
hi def link iconCommentError iconError
hi def link iconSpaceError iconError
hi def link iconCommentError iconError
hi def link iconIncluded iconString
hi def link iconCommentString iconString
hi def link iconComment2String iconString
hi def link iconCommentSkip iconComment
hi def link iconUserLabel Label
hi def link iconCharacter Character
hi def link iconNumber Number
hi def link iconRadix Number
hi def link iconFloat Float
hi def link iconInclude Include
hi def link iconPreProc PreProc
hi def link iconDefine Macro
hi def link iconError Error
hi def link iconStatement Statement
hi def link iconPreCondit PreCondit
hi def link iconString String
hi def link iconCset String
hi def link iconComment Comment
hi def link iconSpecial SpecialChar
hi def link iconTodo Todo
hi def link iconIncluded iconString
hi def link iconPreInclude Include
hi def link iconPreSymbol iconPreProc
hi def link iconPreDefine Define
hi def link iconPreConditional PreCondit
hi def link iconStatement Statement
hi def link iconStorageClass StorageClass
hi def link iconFunction Statement
hi def link iconReserved Label
hi def link iconKeyword Operator
"hi def link iconIdentifier Identifier
hi def link iconFunction Function
hi def link iconReserved Label
hi def link iconLink Include
hi def link iconKeyword Keyword
hi def link iconComment Comment
hi def link iconTodo Todo
hi def link iconDocField SpecialComment
hi def link iconDocumentation Comment
" Postscript {{{1
let b:current_syntax = "icon"
" vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker:

View File

@ -20,7 +20,6 @@ endif
syn case match
let is_bash = 1
unlet! b:current_syntax
syn include @shTop syntax/sh.vim
syn region initngService matchgroup=initngServiceHeader start="^\s*\(service\|virtual\|daemon\|class\|cron\)\s\+\(\(\w\|[-/*]\)\+\(\s\+:\s\+\(\w\|[-/*]\)\+\)\?\)\s\+{" end="}" contains=@initngServiceCluster

View File

@ -1,7 +1,7 @@
" ipfilter syntax file
" Language: ipfilter configuration file
" Maintainer: Hendrik Scholz <hendrik@scholz.net>
" Last Change: 2005 Jan 27
" Last Change: 2022 Jun 14
"
" http://www.wormulon.net/files/misc/ipfilter.vim
"
@ -52,3 +52,4 @@ hi def link IPFNetmask String
hi def link IPFAny Statement
hi def link IPFProto Identifier
let b:current_syntax = 'ipfilter'

View File

@ -279,5 +279,6 @@ hi def link mupadType Type
hi def link mupadDefine Define
hi def link mupadIdentifier Identifier
let b:current_syntax = 'mupad'
" TODO More comprehensive listing.

View File

@ -4,7 +4,7 @@
" Homepage: https://github.com/vim-perl/vim-perl
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
" License: Vim License (see :help license)
" Last Change: 2021 Oct 7
" Last Change: 2022 Jun 13
" Contributors: Andy Lester <andy@petdance.com>
" Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
" Lukas Mai <l.mai.web.de>
@ -442,11 +442,18 @@ syn match perlFormatField "@$" contained
" This problem also exists with empty string delimited heredocs but there's no
" known workaround for that case.
if get(g:, 'perl_fold', 0)
syntax region perlDATA matchgroup=perlDATAStart start="^__DATA__$" end="VIM_PERL_EOF\%$" contains=perlPOD,@perlDATA fold
syntax region perlEND matchgroup=perlENDStart start="^__END__$" end="VIM_PERL_EOF\%$" contains=perlPOD,@perlDATA fold
syntax region perlDATA matchgroup=perlDATAStart start="^__DATA__$" end="VIM_PERL_EOF\%$" contains=@perlDATA fold
syntax region perlEND matchgroup=perlENDStart start="^__END__$" end="VIM_PERL_EOF\%$" contains=@perlDATA fold
else
syntax region perlDATA matchgroup=perlDATAStart start="^__DATA__$" end="\%$" contains=perlPOD,@perlDATA
syntax region perlEND matchgroup=perlENDStart start="^__END__$" end="\%$" contains=perlPOD,@perlDATA
syntax region perlDATA matchgroup=perlDATAStart start="^__DATA__$" end="\%$" contains=@perlDATA
syntax region perlEND matchgroup=perlENDStart start="^__END__$" end="\%$" contains=@perlDATA
endif
" TODO: generalise this to allow other filetypes
if get(g:, 'perl_highlight_data', 0)
syn cluster perlDATA add=perlPOD
else
syn cluster perlDATA remove=perlPOD
endif
"

View File

@ -5,7 +5,7 @@
" Homepage: https://github.com/vim-perl/vim-perl
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
" License: Vim License (see :help license)
" Last Change: 2021 Oct 8
" Last Change: 2022 Jun 13
" To add embedded POD documentation highlighting to your syntax file, add
" the commands:

View File

@ -1,7 +1,7 @@
" Vim syntax file
" Language: FreeBSD send-pr file
" Maintainer: Hendrik Scholz <hendrik@scholz.net>
" Last Change: 2012 Feb 03
" Last Change: 2022 Jun 14
"
" http://raisdorf.net/files/misc/send-pr.vim
@ -31,5 +31,7 @@ hi def link sendprType Type
hi def link sendprString String
hi def link sendprLabel Label
let b:current_syntax = 'sendpr'
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@ -14,4 +14,6 @@ hi def link tarComment Comment
hi def link tarFilename Constant
hi def link tarDirectory Type
let b:current_syntax = 'tar'
" vim: ts=8

View File

@ -1,7 +1,7 @@
" Vim syntax file
" Language: trustees
" Maintainer: Nima Talebi <nima@it.net.au>
" Last Change: 2005-10-12
" Last Change: 2022 Jun 14
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@ -40,3 +40,5 @@ syntax match tfsRuleWho ~\(\*\|[+]\{0,1\}[a-zA-Z0-9/]\+\)~ contained contains=tf
highlight link tfsRuleWho Identifier
syntax match tfsRuleWhat ~[RWEBXODCU!]\+~ contained contains=tfsSpecialChar
highlight link tfsRuleWhat Structure
let b:current_syntax = 'trustees'

View File

@ -435,8 +435,8 @@ syn case match
" User Function Highlighting: {{{2
" (following Gautam Iyer's suggestion)
" ==========================
syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimCommand,vimFuncEcho,vimFuncName,vimUserFunc,vimExecute
syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimCommand,vimNotation
syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimFuncEcho,vimFuncName,vimUserFunc,vimExecute
syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation
syn keyword vimFuncEcho contained ec ech echo
" User Command Highlighting: {{{2