forked from aniani/vim
Update runtime files
This commit is contained in:
2
runtime/autoload/dist/script.vim
vendored
2
runtime/autoload/dist/script.vim
vendored
@@ -4,7 +4,7 @@ vim9script
|
||||
# Invoked from "scripts.vim" in 'runtimepath'
|
||||
#
|
||||
# Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
# Last Change: 2023 Apr 17
|
||||
# Last Change: 2023 May 06
|
||||
|
||||
export def DetectFiletype()
|
||||
var line1 = getline(1)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" netrw.vim: Handles file transfer and remote directory listing across
|
||||
" AUTOLOAD SECTION
|
||||
" Date: Mar 15, 2023
|
||||
" Version: 172
|
||||
" Date: May 03, 2023
|
||||
" Version: 173
|
||||
" Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
|
||||
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
|
||||
" Copyright: Copyright (C) 2016 Charles E. Campbell {{{1
|
||||
@@ -43,7 +43,7 @@ if exists("s:needspatches")
|
||||
endfor
|
||||
endif
|
||||
|
||||
let g:loaded_netrw = "v172"
|
||||
let g:loaded_netrw = "v173"
|
||||
if !exists("s:NOTE")
|
||||
let s:NOTE = 0
|
||||
let s:WARNING = 1
|
||||
@@ -5734,7 +5734,7 @@ fun! s:NetrwEditBuf(bufnum)
|
||||
exe "sil! NetrwKeepj keepalt noswapfile b ".fnameescape(a:bufnum)
|
||||
else
|
||||
" call Decho("exe sil! NetrwKeepj noswapfile b ".fnameescape(a:bufnum))
|
||||
exe "sil! NetrwKeepj noswapfile b ".fnameescape(a:bufnume)
|
||||
exe "sil! NetrwKeepj noswapfile b ".fnameescape(a:bufnum)
|
||||
endif
|
||||
" call Dret("s:NetrwEditBuf")
|
||||
endfun
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
if exists("g:loaded_netrwSettings") || &cp
|
||||
finish
|
||||
endif
|
||||
let g:loaded_netrwSettings = "v18a"
|
||||
let g:loaded_netrwSettings = "v18"
|
||||
if v:version < 700
|
||||
echohl WarningMsg
|
||||
echo "***warning*** this version of netrwSettings needs vim 7.0"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" The default vimrc file.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last change: 2022 Mar 03
|
||||
" Last change: 2023 May 10
|
||||
"
|
||||
" This is loaded if no vimrc file was found.
|
||||
" Except when Vim is run with "-u NONE" or "-C".
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*builtin.txt* For Vim version 9.0. Last change: 2023 Apr 19
|
||||
*builtin.txt* For Vim version 9.0. Last change: 2023 May 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -2260,7 +2260,7 @@ execute({command} [, {silent}]) *execute()*
|
||||
string.
|
||||
{command} can be a string or a List. In case of a List the
|
||||
lines are executed one by one.
|
||||
This is equivalent to: >
|
||||
This is more or less equivalent to: >
|
||||
redir => var
|
||||
{command}
|
||||
redir END
|
||||
@@ -2276,7 +2276,7 @@ execute({command} [, {silent}]) *execute()*
|
||||
*E930*
|
||||
It is not possible to use `:redir` anywhere in {command}.
|
||||
|
||||
To get a list of lines use |split()| on the result: >
|
||||
To get a list of lines use `split()` on the result: >
|
||||
execute('args')->split("\n")
|
||||
|
||||
< To execute a command in another window than the current one
|
||||
@@ -6767,17 +6767,20 @@ prompt_setcallback({buf}, {expr}) *prompt_setcallback()*
|
||||
that was entered at the prompt. This can be an empty string
|
||||
if the user only typed Enter.
|
||||
Example: >
|
||||
call prompt_setcallback(bufnr(), function('s:TextEntered'))
|
||||
func s:TextEntered(text)
|
||||
if a:text == 'exit' || a:text == 'quit'
|
||||
stopinsert
|
||||
" Reset 'modified' to allow the buffer to be closed.
|
||||
" We assume there is nothing useful to be saved.
|
||||
set nomodified
|
||||
close
|
||||
else
|
||||
" Do something useful with "a:text". In this example
|
||||
" we just repeat it.
|
||||
call append(line('$') - 1, 'Entered: "' .. a:text .. '"')
|
||||
" Reset 'modified' to allow the buffer to be closed.
|
||||
set nomodified
|
||||
endif
|
||||
endfunc
|
||||
call prompt_setcallback(bufnr(), function('s:TextEntered'))
|
||||
|
||||
< Can also be used as a |method|: >
|
||||
GetBuffer()->prompt_setcallback(callback)
|
||||
@@ -10259,7 +10262,7 @@ win_execute({id}, {command} [, {silent}]) *win_execute()*
|
||||
The window will temporarily be made the current window,
|
||||
without triggering autocommands or changing directory. When
|
||||
executing {command} autocommands will be triggered, this may
|
||||
have unexpected side effects. Use |:noautocmd| if needed.
|
||||
have unexpected side effects. Use `:noautocmd` if needed.
|
||||
Example: >
|
||||
call win_execute(winid, 'set syntax=python')
|
||||
< Doing the same with `setwinvar()` would not trigger
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 9.0. Last change: 2022 Nov 02
|
||||
*editing.txt* For Vim version 9.0. Last change: 2023 Apr 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 9.0. Last change: 2023 Apr 15
|
||||
*eval.txt* For Vim version 9.0. Last change: 2023 Apr 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*filetype.txt* For Vim version 9.0. Last change: 2023 Feb 15
|
||||
*filetype.txt* For Vim version 9.0. Last change: 2023 Apr 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -660,8 +660,8 @@ page in a Vim window: >
|
||||
|
||||
MANPAGER *manpager.vim*
|
||||
|
||||
The |:Man| command allows you to turn Vim into a manpager (that syntax highlights
|
||||
manpages and follows linked manpages on hitting CTRL-]).
|
||||
The |:Man| command allows you to turn Vim into a manpager (that syntax
|
||||
highlights manpages and follows linked manpages on hitting CTRL-]).
|
||||
|
||||
For bash,zsh,ksh or dash, add to the config file (.bashrc,.zshrc, ...)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui.txt* For Vim version 9.0. Last change: 2023 Mar 01
|
||||
*gui.txt* For Vim version 9.0. Last change: 2023 Apr 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1226,10 +1226,9 @@ This section describes other features which are related to the GUI.
|
||||
like this to set options specifically for each type of GUI: >
|
||||
|
||||
if has("gui_running")
|
||||
if has("gui_gtk2")
|
||||
if has("gui_gtk")
|
||||
:set guifont=Luxi\ Mono\ 12
|
||||
elseif has("x11")
|
||||
" Also for GTK 1
|
||||
:set guifont=*-lucidatypewriter-medium-r-normal-*-*-180-*-*-m-*-*
|
||||
elseif has("gui_win32")
|
||||
:set guifont=Luxi_Mono:h12:cANSI
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_perl.txt* For Vim version 9.0. Last change: 2022 Mar 13
|
||||
*if_perl.txt* For Vim version 9.0. Last change: 2023 May 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Sven Verdoolaege
|
||||
@@ -254,23 +254,14 @@ $main::curbuf
|
||||
|
||||
*script-here*
|
||||
When using a script language in-line, you might want to skip this when the
|
||||
language isn't supported. But this mechanism doesn't work: >
|
||||
language isn't supported. >
|
||||
if has('perl')
|
||||
perl << EOF
|
||||
this will NOT work!
|
||||
print 'perl works'
|
||||
EOF
|
||||
endif
|
||||
Instead, put the Perl/Python/Ruby/etc. command in a function and call that
|
||||
function: >
|
||||
if has('perl')
|
||||
function DefPerl()
|
||||
perl << EOF
|
||||
this works
|
||||
EOF
|
||||
endfunction
|
||||
call DefPerl()
|
||||
endif
|
||||
Note that "EOF" must be at the start of the line.
|
||||
Note that "EOF" must be at the start of the line without preceding white
|
||||
space.
|
||||
|
||||
==============================================================================
|
||||
4. Dynamic loading *perl-dynamic*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 9.0. Last change: 2023 Mar 09
|
||||
*map.txt* For Vim version 9.0. Last change: 2023 May 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1873,8 +1873,14 @@ remains unmodified. Also see |f-args-example| below. Overview:
|
||||
XX a\\\ b 'a\ b'
|
||||
XX a\\\\b 'a\\b'
|
||||
XX a\\\\ b 'a\\', 'b'
|
||||
XX [nothing]
|
||||
|
||||
|
||||
Note that if the "no arguments" situation is to be handled, you have to make
|
||||
sure that the function can be called without arguments. For a compiled
|
||||
function you might want to use variable arguments, see
|
||||
|vim9-variable-arguments|.
|
||||
|
||||
Examples for user commands: >
|
||||
|
||||
" Delete everything after here to the end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 9.0. Last change: 2023 Apr 12
|
||||
*options.txt* For Vim version 9.0. Last change: 2023 May 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -925,6 +925,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'autowriteall' for that.
|
||||
Some buffers will not be written, specifically when 'buftype' is
|
||||
"nowrite", "nofile", "terminal" or "prompt".
|
||||
USE WITH CARE: If you make temporary changes to a buffer that you
|
||||
don't want to be saved this option may cause it to be saved anyway.
|
||||
Renaming the buffer with ":file {name}" may help avoid this.
|
||||
|
||||
*'autowriteall'* *'awa'* *'noautowriteall'* *'noawa'*
|
||||
'autowriteall' 'awa' boolean (default off)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_netrw.txt* For Vim version 9.0. Last change: 2023 Apr 22
|
||||
*pi_netrw.txt* For Vim version 9.0. Last change: 2023 May 14
|
||||
|
||||
------------------------------------------------
|
||||
NETRW REFERENCE MANUAL by Charles E. Campbell
|
||||
@@ -208,7 +208,7 @@ EXTERNAL APPLICATIONS AND PROTOCOLS *netrw-externapp* {{{2
|
||||
http: g:netrw_http_cmd = "links" elseif links is available
|
||||
http: g:netrw_http_cmd = "curl" elseif curl is available
|
||||
http: g:netrw_http_cmd = "wget" elseif wget is available
|
||||
http: g:netrw_http_cmd = "fetch" elseif fetch is available
|
||||
http: g:netrw_http_cmd = "fetch" elseif fetch is available
|
||||
http: *g:netrw_http_put_cmd* = "curl -T"
|
||||
rcp: *g:netrw_rcp_cmd* = "rcp"
|
||||
rsync: *g:netrw_rsync_cmd* = "rsync" (see |g:netrw_rsync_sep|)
|
||||
@@ -968,7 +968,7 @@ itself:
|
||||
fun! NetReadFixup(method, line1, line2)
|
||||
if method == 3 " ftp (no <.netrc>)
|
||||
let fourblanklines= line2 - 3
|
||||
silent fourblanklines.",".line2."g/^\s*/d"
|
||||
silent fourblanklines .. "," .. line2 .. "g/^\s*/d"
|
||||
endif
|
||||
endfunction
|
||||
endif
|
||||
@@ -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]
|
||||
|
||||
@@ -1625,8 +1625,10 @@ A further approach is to delete files which match a pattern.
|
||||
This will cause the matching files to be marked. Then,
|
||||
press "D".
|
||||
|
||||
Please note that only empty directories may be deleted with the "D" mapping.
|
||||
Regular files are deleted with |delete()|, too.
|
||||
If your vim has 7.4 with patch#1107, then |g:netrw_localrmdir| no longer
|
||||
is used to remove directories; instead, vim's |delete()| is used with
|
||||
the "d" option. Please note that only empty directories may be deleted
|
||||
with the "D" mapping. Regular files are deleted with |delete()|, too.
|
||||
|
||||
The |g:netrw_rm_cmd|, |g:netrw_rmf_cmd|, and |g:netrw_rmdir_cmd| variables are
|
||||
used to control the attempts to remove remote files and directories. The
|
||||
@@ -1645,7 +1647,8 @@ to remove it again using the g:netrw_rmf_cmd variable. Its default value is:
|
||||
|g:netrw_rmf_cmd|: ssh HOSTNAME rm -f
|
||||
|
||||
Related topics: |netrw-d|
|
||||
Associated setting variable: |g:netrw_rm_cmd| |g:netrw_ssh_cmd|
|
||||
Associated setting variable: |g:netrw_localrmdir| |g:netrw_rm_cmd|
|
||||
|g:netrw_rmdir_cmd| |g:netrw_ssh_cmd|
|
||||
|
||||
|
||||
*netrw-explore* *netrw-hexplore* *netrw-nexplore* *netrw-pexplore*
|
||||
@@ -1688,11 +1691,7 @@ DIRECTORY EXPLORATION COMMANDS {{{2
|
||||
to 2; edits will thus preferentially be made in window#2.
|
||||
|
||||
The [N] specifies a |g:netrw_winsize| just for the new :Lexplore
|
||||
window. That means that
|
||||
if [N] < 0 : use |N| columns for the Lexplore window
|
||||
if [N] = 0 : a normal split is made
|
||||
if [N] > 0 : use N% of the current window will be used for the
|
||||
new window
|
||||
window.
|
||||
|
||||
Those who like this method often also like tree style displays;
|
||||
see |g:netrw_liststyle|.
|
||||
@@ -1976,7 +1975,7 @@ To use this function, simply assign its output to |g:netrw_list_hide| option. >
|
||||
Example: let g:netrw_list_hide= netrw_gitignore#Hide('my_gitignore_file')
|
||||
Function can take additional files with git-ignore patterns.
|
||||
|
||||
Example: g:netrw_list_hide= netrw_gitignore#Hide() . '.*\.swp$'
|
||||
Example: let g:netrw_list_hide= netrw_gitignore#Hide() .. '.*\.swp$'
|
||||
Combining 'netrw_gitignore#Hide' with custom patterns.
|
||||
<
|
||||
|
||||
@@ -2816,7 +2815,7 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
= 2: wide listing (multiple files in columns)
|
||||
= 3: tree style listing
|
||||
|
||||
*g:netrw_list_hide* comma separated pattern list for hiding files
|
||||
*g:netrw_list_hide* comma-separated pattern list for hiding files
|
||||
Patterns are regular expressions (see |regexp|)
|
||||
There's some special support for git-ignore
|
||||
files: you may add the output from the helper
|
||||
@@ -2826,7 +2825,7 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
|
||||
Examples:
|
||||
let g:netrw_list_hide= '.*\.swp$'
|
||||
let g:netrw_list_hide= netrw_gitignore#Hide().'.*\.swp$'
|
||||
let g:netrw_list_hide= netrw_gitignore#Hide() .. '.*\.swp$'
|
||||
default: ""
|
||||
|
||||
*g:netrw_localcopycmd* ="cp" Linux/Unix/MacOS/Cygwin
|
||||
@@ -2864,6 +2863,14 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
=" /c move" Windows
|
||||
Options for |g:netrw_localmovecmd|
|
||||
|
||||
*g:netrw_localrmdir* ="rmdir" Linux/Unix/MacOS/Cygwin
|
||||
=expand("$COMSPEC") Windows
|
||||
Remove directory command (rmdir)
|
||||
This variable is only used if your vim is
|
||||
earlier than 7.4 or if your vim doesn't
|
||||
have patch#1107. Otherwise, |delete()|
|
||||
is used with the "d" option.
|
||||
|
||||
*g:netrw_maxfilenamelen* =32 by default, selected so as to make long
|
||||
listings fit on 80 column displays.
|
||||
If your screen is wider, and you have file
|
||||
@@ -3774,7 +3781,7 @@ Example: Clear netrw's marked file list via a mapping on gu >
|
||||
Netrw uses several system level commands to do things (see
|
||||
|
||||
|g:netrw_localcopycmd|, |g:netrw_localmovecmd|,
|
||||
|g:netrw_mkdir_cmd|).
|
||||
|g:netrw_localrmdir|, |g:netrw_mkdir_cmd|).
|
||||
|
||||
You may need to adjust the default commands for one or more of
|
||||
these commands by setting them properly in your .vimrc. Another
|
||||
@@ -3900,13 +3907,8 @@ netrw:
|
||||
==============================================================================
|
||||
12. History *netrw-history* {{{1
|
||||
|
||||
v172: Sep 02, 2021 * (Bram Moolenaar) Changed "l:go" to "go"
|
||||
* (Bram Moolenaar) no need for "b" in
|
||||
netrw-safe guioptions
|
||||
Nov 15, 2021 * removed netrw_localrm and netrw_localrmdir
|
||||
references
|
||||
Aug 18, 2022 * (Miguel Barro) improving compatability with
|
||||
powershell
|
||||
v172: Apr 22, 2023 * removed g:netrw_localrmdiropt
|
||||
removed g:netrw_localrmdir
|
||||
v171: Oct 09, 2020 * included code in s:NetrwOptionsSafe()
|
||||
to allow |'bh'| to be set to delete when
|
||||
rather than hide when g:netrw_fastbrowse
|
||||
@@ -3991,8 +3993,10 @@ netrw:
|
||||
Nov 09, 2016 * Broke apart the command from the options,
|
||||
mostly for Windows. Introduced new netrw
|
||||
settings: |g:netrw_localcopycmdopt|
|
||||
|g:netrw_localcopydircmdopt| |g:netrw_localmkdiropt|
|
||||
|g:netrw_localmovecmdopt| g:netrw_localrmdiropt
|
||||
|g:netrw_localcopydircmdopt|
|
||||
|g:netrw_localmkdiropt|
|
||||
|g:netrw_localmovecmdopt|
|
||||
g:netrw_localrmdiropt
|
||||
Nov 21, 2016 * (mattn) provided a patch for preview; swapped
|
||||
winwidth() with winheight()
|
||||
Nov 22, 2016 * (glacambre) reported that files containing
|
||||
@@ -4052,7 +4056,7 @@ netrw:
|
||||
refreshes. However, inside a |:map-<expr>|,
|
||||
tab and window changes are disallowed. Fixed.
|
||||
(affects netrw's s:LocalBrowseRefresh())
|
||||
* g:netrw_localrmdir not used any more, but
|
||||
* |g:netrw_localrmdir| not used any more, but
|
||||
the relevant patch that causes |delete()| to
|
||||
take over was #1107 (not #1109).
|
||||
* |expand()| is now used on |g:netrw_home|;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*repeat.txt* For Vim version 9.0. Last change: 2023 Apr 02
|
||||
*repeat.txt* For Vim version 9.0. Last change: 2023 May 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -65,7 +65,7 @@ Using the underscore after `:d` avoids clobbering registers or the clipboard.
|
||||
This also makes it faster.
|
||||
|
||||
Instead of the '/' which surrounds the {pattern}, you can use any other
|
||||
single byte character, but not an alphabetic character, '\', '"' or '|'.
|
||||
single byte character, but not an alphabetic character, '\', '"', '|' or '!'.
|
||||
This is useful if you want to include a '/' in the search pattern or
|
||||
replacement string.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 9.0. Last change: 2023 Apr 05
|
||||
*syntax.txt* For Vim version 9.0. Last change: 2023 Apr 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -4929,7 +4929,7 @@ is mostly used, because it looks better.
|
||||
==============================================================================
|
||||
13. Colorschemes *color-schemes*
|
||||
|
||||
In the next section you can find information about indivisual highlight groups
|
||||
In the next section you can find information about individual highlight groups
|
||||
and how to specify colors for them. Most likely you want to just select a set
|
||||
of colors by using the `:colorscheme` command, for example: >
|
||||
|
||||
|
||||
@@ -4186,7 +4186,6 @@ E1133 vim9.txt /*E1133*
|
||||
E1134 vim9.txt /*E1134*
|
||||
E1135 eval.txt /*E1135*
|
||||
E1136 map.txt /*E1136*
|
||||
E1137 map.txt /*E1137*
|
||||
E1138 eval.txt /*E1138*
|
||||
E1139 vim9.txt /*E1139*
|
||||
E114 eval.txt /*E114*
|
||||
@@ -7422,6 +7421,7 @@ g:netrw_localmkdir pi_netrw.txt /*g:netrw_localmkdir*
|
||||
g:netrw_localmkdiropt pi_netrw.txt /*g:netrw_localmkdiropt*
|
||||
g:netrw_localmovecmd pi_netrw.txt /*g:netrw_localmovecmd*
|
||||
g:netrw_localmovecmdopt pi_netrw.txt /*g:netrw_localmovecmdopt*
|
||||
g:netrw_localrmdir pi_netrw.txt /*g:netrw_localrmdir*
|
||||
g:netrw_maxfilenamelen pi_netrw.txt /*g:netrw_maxfilenamelen*
|
||||
g:netrw_menu pi_netrw.txt /*g:netrw_menu*
|
||||
g:netrw_mkdir_cmd pi_netrw.txt /*g:netrw_mkdir_cmd*
|
||||
@@ -9885,6 +9885,7 @@ string eval.txt /*string*
|
||||
string() builtin.txt /*string()*
|
||||
string-functions usr_41.txt /*string-functions*
|
||||
string-match builtin.txt /*string-match*
|
||||
string-offset-encoding eval.txt /*string-offset-encoding*
|
||||
strlen() builtin.txt /*strlen()*
|
||||
strpart() builtin.txt /*strpart()*
|
||||
strpbrk() builtin.txt /*strpbrk()*
|
||||
@@ -9894,6 +9895,7 @@ strridx() builtin.txt /*strridx()*
|
||||
strspn() builtin.txt /*strspn()*
|
||||
strstr() builtin.txt /*strstr()*
|
||||
strtrans() builtin.txt /*strtrans()*
|
||||
strutf16len() builtin.txt /*strutf16len()*
|
||||
strwidth() builtin.txt /*strwidth()*
|
||||
style-changes develop.txt /*style-changes*
|
||||
style-compiler develop.txt /*style-compiler*
|
||||
@@ -10556,6 +10558,7 @@ utf-8 mbyte.txt /*utf-8*
|
||||
utf-8-char-arg mbyte.txt /*utf-8-char-arg*
|
||||
utf-8-in-xwindows mbyte.txt /*utf-8-in-xwindows*
|
||||
utf-8-typing mbyte.txt /*utf-8-typing*
|
||||
utf16idx() builtin.txt /*utf16idx()*
|
||||
utf8 mbyte.txt /*utf8*
|
||||
v visual.txt /*v*
|
||||
v: eval.txt /*v:*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*testing.txt* For Vim version 9.0. Last change: 2022 Dec 30
|
||||
*testing.txt* For Vim version 9.0. Last change: 2023 May 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -448,13 +448,14 @@ assert_beeps({cmd}) *assert_beeps()*
|
||||
assert_equal({expected}, {actual} [, {msg}])
|
||||
When {expected} and {actual} are not equal an error message is
|
||||
added to |v:errors| and 1 is returned. Otherwise zero is
|
||||
returned |assert-return|.
|
||||
returned. |assert-return|
|
||||
The error is in the form "Expected {expected} but got
|
||||
{actual}". When {msg} is present it is prefixed to that.
|
||||
|
||||
There is no automatic conversion, the String "4" is different
|
||||
from the Number 4. And the number 4 is different from the
|
||||
Float 4.0. The value of 'ignorecase' is not used here, case
|
||||
always matters.
|
||||
When {msg} is omitted an error in the form "Expected
|
||||
{expected} but got {actual}" is produced.
|
||||
Example: >
|
||||
assert_equal('foo', 'bar')
|
||||
< Will result in a string to be added to |v:errors|:
|
||||
@@ -533,11 +534,12 @@ assert_fails({cmd} [, {error} [, {msg} [, {lnum} [, {context}]]]])
|
||||
assert_false({actual} [, {msg}]) *assert_false()*
|
||||
When {actual} is not false an error message is added to
|
||||
|v:errors|, like with |assert_equal()|.
|
||||
The error is in the form "Expected False but got {actual}".
|
||||
When {msg} is present it is prepended to that.
|
||||
Also see |assert-return|.
|
||||
|
||||
A value is false when it is zero. When {actual} is not a
|
||||
number the assert fails.
|
||||
When {msg} is omitted an error in the form
|
||||
"Expected False but got {actual}" is produced.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetResult()->assert_false()
|
||||
@@ -546,14 +548,16 @@ assert_inrange({lower}, {upper}, {actual} [, {msg}]) *assert_inrange()*
|
||||
This asserts number and |Float| values. When {actual} is lower
|
||||
than {lower} or higher than {upper} an error message is added
|
||||
to |v:errors|. Also see |assert-return|.
|
||||
When {msg} is omitted an error in the form
|
||||
"Expected range {lower} - {upper}, but got {actual}" is
|
||||
produced.
|
||||
The error is in the form "Expected range {lower} - {upper},
|
||||
but got {actual}". When {msg} is present it is prefixed to
|
||||
that.
|
||||
|
||||
*assert_match()*
|
||||
assert_match({pattern}, {actual} [, {msg}])
|
||||
When {pattern} does not match {actual} an error message is
|
||||
added to |v:errors|. Also see |assert-return|.
|
||||
The error is in the form "Pattern {pattern} does not match
|
||||
{actual}". When {msg} is present it is prefixed to that.
|
||||
|
||||
{pattern} is used as with |=~|: The matching is always done
|
||||
like 'magic' was set and 'cpoptions' is empty, no matter what
|
||||
@@ -563,8 +567,6 @@ assert_match({pattern}, {actual} [, {msg}])
|
||||
Use "^" and "$" to match with the start and end of the text.
|
||||
Use both to match the whole text.
|
||||
|
||||
When {msg} is omitted an error in the form
|
||||
"Pattern {pattern} does not match {actual}" is produced.
|
||||
Example: >
|
||||
assert_match('^f.*o$', 'foobar')
|
||||
< Will result in a string to be added to |v:errors|:
|
||||
@@ -614,8 +616,7 @@ assert_true({actual} [, {msg}]) *assert_true()*
|
||||
Also see |assert-return|.
|
||||
A value is TRUE when it is a non-zero number. When {actual}
|
||||
is not a number the assert fails.
|
||||
When {msg} is omitted an error in the form "Expected True but
|
||||
got {actual}" is produced.
|
||||
When {msg} is given it precedes the default message.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetResult()->assert_true()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*textprop.txt* For Vim version 9.0. Last change: 2022 Dec 19
|
||||
*textprop.txt* For Vim version 9.0. Last change: 2023 Apr 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -165,8 +165,8 @@ prop_add({lnum}, {col}, {props})
|
||||
text_padding_left *E1296*
|
||||
used when "text" is present and {col} is zero;
|
||||
padding between the end of the text line
|
||||
(leftmost column for "below") and the virtual
|
||||
text, not highlighted
|
||||
(leftmost column for "above" and "below") and
|
||||
the virtual text, not highlighted
|
||||
text_wrap when "text" is present and {col} is zero,
|
||||
specifies what happens if the text doesn't
|
||||
fit:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 9.0. Last change: 2023 Apr 22
|
||||
*todo.txt* For Vim version 9.0. Last change: 2023 May 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -38,17 +38,9 @@ browser use: https://github.com/vim/vim/issues/1234
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Delete ci/load-snd-dummy.sh?
|
||||
Update Filelist
|
||||
|
||||
When using ":set no<CTRL-A>" add options starting with "no", not all boolean
|
||||
options.
|
||||
|
||||
Crash when splitting window: #11961. Set RedrawingDisabled in
|
||||
win_split_ins().
|
||||
|
||||
In runtime/autoload/dist/script.vim change "set ft=" to "setlocal ft=" ?
|
||||
|
||||
CTRL-J mapping is not used if halfway another mapping. #12002
|
||||
Is simplified mapping not used but escape code has been simplified?
|
||||
|
||||
@@ -57,16 +49,40 @@ in restore_snapshot_rec() restore more values from the snapshot, instead of
|
||||
calling frame_new_height() and frame_new_width(), especially w_topline and
|
||||
w_skipcol.
|
||||
|
||||
'smoothscroll' problem: #12199
|
||||
Problems related to 'smoothscroll': #12218 and #12211
|
||||
Check places that source "path/*.vim" to not match other extensions, e.g.
|
||||
.vim9, on MS-Windows (short file name match, gets expanded to long file name).
|
||||
E.g. for startup files, plugins, packs, etc.
|
||||
|
||||
When a help item can't be found, then open 'helpfile'. Search for the tag in
|
||||
that file and gtive E149 only when not found. Helps for a tiny Vim installed
|
||||
without all the help files.
|
||||
|
||||
Virtual text problems:
|
||||
- Deleting character before a wrapping virtual text, causes for the following
|
||||
lines to dissapear (Issue #12244)
|
||||
- If 'list' is on, 'below' virtual text which includes 1 or 2 characters are
|
||||
gone (Issue #12028)
|
||||
- Virtual text aligned "above": Wrong indentation when using tabs (Issue
|
||||
#12232)
|
||||
- Virtual text to the right of the line that fits exactly on screen causes
|
||||
that line and all lines below it not to be displayed (Issue #12213)
|
||||
- Window screen gets wrong when a virtual text is placed on 'above' or
|
||||
'below' on an empty line (Issue #11959)
|
||||
|
||||
include #12140: positional arguments in printf(), fixes #10577
|
||||
|
||||
Include #11818: attach custom data to quickfix items.
|
||||
|
||||
When a help item can't be found, then open 'helpfile'. Search for the tag in
|
||||
that file and gtive E149 only when not found. Helps for a tiny Vim installed
|
||||
without all the help files.
|
||||
Include #12292: buffer argument for undotree()?
|
||||
|
||||
When 'virtualedit' is "all" and 'cursorcolumn' is set, the wrong column may be
|
||||
highlighted. (van-de-bugger, 2018 Jan 23, #2576)
|
||||
|
||||
Improve profiling by caching matching functions: PR #12192
|
||||
|
||||
Add filecopy() ? #12346
|
||||
|
||||
Implement foreach() PR #12166
|
||||
|
||||
Errors when running tests with valgrind:
|
||||
- test_codestyle.vim: e.g.:
|
||||
@@ -100,8 +116,21 @@ Further Vim9 improvements, possibly after launch:
|
||||
- implement :class and :interface: See |vim9-classes
|
||||
- Change access: public by default, private by prefixing "_".
|
||||
Check for error: can't have same name twice (ignoring "_" prefix).
|
||||
- Cannot use class type of itself in the method (Issue #12369)
|
||||
- class members initialized during definition (Issue #12041)
|
||||
- cannot call class member of funcref type (Issue #12324)
|
||||
- nested function unable to directly modify private member (Issue #12076)
|
||||
And: can't use "this" keyword in lambda function (Issue #12336)
|
||||
- "return this" required for early return from constructor (inconsistent)
|
||||
(Issue #12040)
|
||||
- class/method confusion inside ":def" when using "class extends" (Issue
|
||||
#12089)
|
||||
- null_object - constant type 17 not supported (Issue #12043)
|
||||
- problem compiling object method call as function call argument (Issue
|
||||
#12081)
|
||||
- Make ":defcompile ClassName" compile all functions and methods in the
|
||||
class.
|
||||
- object's method in stacktrace missing information (Issue #12078)
|
||||
- Forward declaration of a class? E.g. for Clone() function.
|
||||
email lifepillar 2023 Mar 26
|
||||
- Getting member of variable with "any" type should be handled at runtime.
|
||||
@@ -112,12 +141,18 @@ Further Vim9 improvements, possibly after launch:
|
||||
Perhaps use "private" keyword instead of "_" prefix?
|
||||
- "final" object members - can only be set in the constructor.
|
||||
- "obj.Method()" does not always work in a compiled function, assumes "obj"
|
||||
is a dictionary. #12196
|
||||
is a dictionary. #12196 Issue #12024 might be the same problem.
|
||||
Issue #11822: any.Func() can be a dict or an object call, need to handle
|
||||
this at runtime. Also see #12198 for an example.
|
||||
Possibly issue #11981 can be fixed at the same time (has two examples).
|
||||
- accept line breaks in member initialization. #11957
|
||||
- object empty(), len() - can class define a method to be used for them?
|
||||
- add to help: when using a default new() method then reordering object
|
||||
members may cause trouble. Can define new() without arguments to avoid.
|
||||
- TODO items: check types for "implements" - members and methods
|
||||
- When "Meta" is a class, is "const MetaAlias = Meta" allowed? It should
|
||||
either work or given an error. possibly give an error now and implement it
|
||||
later (using a typedef). #12006
|
||||
- how about lock/unlock?
|
||||
- When checking "implements" also check types of members and function args.
|
||||
- For chaining, allow using the class name as type for function return
|
||||
@@ -127,8 +162,6 @@ Further Vim9 improvements, possibly after launch:
|
||||
- More efficient way for interface member index than iterating over list?
|
||||
- a variant of type() that returns a different type for each class?
|
||||
list<number> and list<string> should also differ.
|
||||
- Issue #11822: any.Func() can be a dict or an object call, need to handle
|
||||
this at runtime. Also see #12198 for an example.
|
||||
- implement :type
|
||||
- implement :enum
|
||||
- Promise class, could be used to wait on a popup close callback?
|
||||
@@ -271,6 +304,11 @@ Terminal emulator window:
|
||||
- When in terminal-Normal mode when the job finishes, the cursor jumps to the
|
||||
end but the window is not updated. This only happens when typing "a".
|
||||
:term bash -c "for V in {0..5}; do echo $V; sleep 1; done"
|
||||
- GUI: cursor color is not updated when going to Terminal-Job mode. #12328
|
||||
- GUI: cursor color is not updated when switching between tabs with a key.
|
||||
#12329
|
||||
- GUI: cursor color is not updated when switching between tabs with a mouse
|
||||
click. #12330
|
||||
- When started with ":terminal ++close" and the shell exits but there is a
|
||||
background process, the window remains open, because the channel still
|
||||
exists (and output still shows). Perhaps close the window when an explicit
|
||||
@@ -345,6 +383,11 @@ Add BufDeletePost. #11041
|
||||
|
||||
Add winid arg to col() and charcol() #11466 (request #11461)
|
||||
|
||||
When :argument has a non-number argument, use it like :buffer to find the
|
||||
argument by name. #12272
|
||||
|
||||
Fold unexpectedly closed when inserting fold marker with CTRL-V (Issue #12320)
|
||||
|
||||
Can we make 'noendofline' and 'endoffile' visible? Should show by default,
|
||||
since it's an unusual situation.
|
||||
- Show 'noendofline' when it would be used for writing ('fileformat' "dos")
|
||||
@@ -763,6 +806,9 @@ Improve fallback for menu translations, to avoid having to create lots of
|
||||
files that source the actual file. E.g. menu_da_de -> menu_da
|
||||
Include part of #3242?
|
||||
|
||||
Patch for different behavior of text objects with quotes: #11976
|
||||
Is this actually better?
|
||||
|
||||
Patch to have text objects defined by arbitrary single characters. (Daniel
|
||||
Thau, 2013 Nov 20, 2014 Jan 29, 2014 Jan 31)
|
||||
Added tests (James McCoy, 2016 Aug 3, #958). Still needs more work.
|
||||
@@ -1031,9 +1077,6 @@ option_save({list}) *option_save()*
|
||||
directory (Paulo Marcel Coelho Arabic, 2017 Oct 30, #2266)
|
||||
Also see #1689.
|
||||
|
||||
When 'virtualedit' is "all" and 'cursorcolumn' is set, the wrong column may be
|
||||
highlighted. (van-de-bugger, 2018 Jan 23, #2576)
|
||||
|
||||
No profile information for function that executes ":quit". (Daniel Hahler,
|
||||
2017 Dec 26, #2501)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_01.txt* For Vim version 9.0. Last change: 2019 Nov 21
|
||||
*usr_01.txt* For Vim version 9.0. Last change: 2023 May 12
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -161,7 +161,7 @@ filename. For French:
|
||||
==============================================================================
|
||||
*01.4* Copyright *manual-copyright*
|
||||
|
||||
The Vim user manual and reference manual are Copyright (c) 1988-2003 by Bram
|
||||
The Vim user manual and reference manual are Copyright (c) 1988 by Bram
|
||||
Moolenaar. This material may be distributed only subject to the terms and
|
||||
conditions set forth in the Open Publication License, v1.0 or later. The
|
||||
latest version is presently available at:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 9.0. Last change: 2023 Jan 17
|
||||
*usr_41.txt* For Vim version 9.0. Last change: 2023 May 06
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2023 Mar 28
|
||||
" Last Change: 2023 May 10
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
|
||||
14
runtime/ftplugin/luau.vim
Normal file
14
runtime/ftplugin/luau.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Luau
|
||||
" Maintainer: None yet
|
||||
" Last Change: 2023 Apr 30
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Luau is a superset of Lua
|
||||
runtime! ftplugin/lua.vim
|
||||
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8
|
||||
18
runtime/ftplugin/usd.vim
Normal file
18
runtime/ftplugin/usd.vim
Normal file
@@ -0,0 +1,18 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Pixar Animation's Universal Scene Description format
|
||||
" Maintainer: Colin Kennedy <colinvfx@gmail.com>
|
||||
" Last Change: 2023 May 9
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal commentstring=#\ %s
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
63
runtime/indent/dts.vim
Normal file
63
runtime/indent/dts.vim
Normal file
@@ -0,0 +1,63 @@
|
||||
" Vim indent file
|
||||
" Language: Device Tree
|
||||
" Maintainer: Roland Hieber, Pengutronix <rhi@pengutronix.de>
|
||||
"
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal autoindent
|
||||
setlocal nosmartindent
|
||||
setlocal indentkeys=o,O,0},0<>>,!<Ctrl-F>
|
||||
setlocal indentexpr=GetDTSIndent()
|
||||
setlocal nolisp
|
||||
|
||||
let b:undo_indent = 'setl autoindent< smartindent< indentkeys< indentexpr< lisp<'
|
||||
|
||||
function GetDTSIndent()
|
||||
let sw = shiftwidth()
|
||||
let lnum = v:lnum
|
||||
let line = getline(lnum)
|
||||
let prevline = getline(prevnonblank(lnum-1))
|
||||
let prevind = indent(prevnonblank(lnum-1))
|
||||
|
||||
if prevnonblank(lnum-1) < 1
|
||||
return 0
|
||||
endif
|
||||
|
||||
" Don't indent header and preprocessor directives
|
||||
if line =~ '^\s*\(/dts-\|#\(include\|define\|undef\|warn\(ing\)\?\|error\|if\(n\?def\)\?\|else\|elif\|endif\)\)'
|
||||
return 0
|
||||
|
||||
" Don't indent /node and &label blocks
|
||||
elseif line =~ '^\s*[/&].\+{\s*$'
|
||||
return 0
|
||||
|
||||
" Indent to matching bracket or remove one shiftwidth if line begins with } or >
|
||||
elseif line =~ '^\s*[}>]'
|
||||
" set cursor to closing bracket on current line
|
||||
let col = matchend(line, '^\s*[>}]')
|
||||
call cursor(lnum, col)
|
||||
|
||||
" determine bracket type, {} or <>
|
||||
let pair = strpart('{}<>', stridx('}>', line[col-1]) * 2, 2)
|
||||
|
||||
" find matching bracket pair
|
||||
let pairline = searchpair(pair[0], '', pair[1], 'bW')
|
||||
|
||||
if pairline > 0
|
||||
return indent(pairline)
|
||||
else
|
||||
return prevind - sw
|
||||
endif
|
||||
|
||||
" else, add one level of indent if line ends in { or < or = or ,
|
||||
elseif prevline =~ '[{<=,]$'
|
||||
return prevind + sw
|
||||
|
||||
else
|
||||
return prevind
|
||||
endif
|
||||
|
||||
endfunction
|
||||
14
runtime/indent/luau.vim
Normal file
14
runtime/indent/luau.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype indent file
|
||||
" Language: Luau
|
||||
" Maintainer: None yet
|
||||
" Last Change: 2023 Apr 30
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Luau is a superset of Lua
|
||||
runtime! indent/lua.vim
|
||||
|
||||
|
||||
46
runtime/indent/testdir/dts.in
Normal file
46
runtime/indent/testdir/dts.in
Normal file
@@ -0,0 +1,46 @@
|
||||
/* vim: set ft=dts noet sw=8 : */
|
||||
|
||||
/* START_INDENT */
|
||||
/dts-v1/;
|
||||
#include <dt-bindings/pinctrl/pinctrl-imx6q.h>
|
||||
#include "imx6qdl.dtsi"
|
||||
#include "imx6qdl-someboard.dtsi"
|
||||
|
||||
/delete-node/ &{/memory@10000000};
|
||||
|
||||
/ {
|
||||
compatible = "some,board";
|
||||
/delete-node/ memory;
|
||||
|
||||
chosen {
|
||||
environment = &{usdhc4/partitions/partition@0};
|
||||
};
|
||||
}
|
||||
|
||||
&iomuxc {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hog>;
|
||||
|
||||
pinctrl_gpiohog: gpiohoggrp {
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_GPIO_9__GPIO1_IO09 0x130b0
|
||||
MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x130b0
|
||||
>;
|
||||
};
|
||||
}
|
||||
|
||||
&usdhc4 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
|
||||
partition@0 {
|
||||
label = "environment";
|
||||
reg = <0x0 0xe0000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&{/aliases} {
|
||||
usb0 = &usb;
|
||||
};
|
||||
/* END_INDENT */
|
||||
46
runtime/indent/testdir/dts.ok
Normal file
46
runtime/indent/testdir/dts.ok
Normal file
@@ -0,0 +1,46 @@
|
||||
/* vim: set ft=dts noet sw=8 : */
|
||||
|
||||
/* START_INDENT */
|
||||
/dts-v1/;
|
||||
#include <dt-bindings/pinctrl/pinctrl-imx6q.h>
|
||||
#include "imx6qdl.dtsi"
|
||||
#include "imx6qdl-someboard.dtsi"
|
||||
|
||||
/delete-node/ &{/memory@10000000};
|
||||
|
||||
/ {
|
||||
compatible = "some,board";
|
||||
/delete-node/ memory;
|
||||
|
||||
chosen {
|
||||
environment = &{usdhc4/partitions/partition@0};
|
||||
};
|
||||
}
|
||||
|
||||
&iomuxc {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hog>;
|
||||
|
||||
pinctrl_gpiohog: gpiohoggrp {
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_GPIO_9__GPIO1_IO09 0x130b0
|
||||
MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x130b0
|
||||
>;
|
||||
};
|
||||
}
|
||||
|
||||
&usdhc4 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
|
||||
partition@0 {
|
||||
label = "environment";
|
||||
reg = <0x0 0xe0000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&{/aliases} {
|
||||
usb0 = &usb;
|
||||
};
|
||||
/* END_INDENT */
|
||||
@@ -2,7 +2,7 @@
|
||||
" You can also use this as a start for your own set of menus.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2022 Nov 27
|
||||
" Last Change: 2023 May 03
|
||||
|
||||
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
|
||||
" in all modes and avoid side effects from mappings defined by the user.
|
||||
@@ -607,7 +607,9 @@ def s:XxdBack()
|
||||
exe ':%!' .. g:xxdprogram .. ' -r'
|
||||
endif
|
||||
set ft=
|
||||
doautocmd filetypedetect BufReadPost
|
||||
if exists('#filetypedetect') && exists('#BufReadPost')
|
||||
doautocmd filetypedetect BufReadPost
|
||||
endif
|
||||
&mod = mod
|
||||
enddef
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
if &cp || exists("g:loaded_netrwPlugin")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_netrwPlugin = "v172"
|
||||
let g:loaded_netrwPlugin = "v173"
|
||||
let s:keepcpo = &cpo
|
||||
set cpo&vim
|
||||
"DechoRemOn
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: dts/dtsi (device tree files)
|
||||
" Maintainer: Daniel Mack <vim@zonque.org>
|
||||
" Last Change: 2022 Jun 14
|
||||
" Last Change: 2023 Apr 28
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -10,9 +10,10 @@ let b:current_syntax = 'dts'
|
||||
|
||||
syntax region dtsComment start="/\*" end="\*/"
|
||||
syntax match dtsReference "&[[:alpha:][:digit:]_]\+"
|
||||
syntax match dtsReference "&{[[:alpha:][:digit:]@_/-]\+}"
|
||||
syntax region dtsBinaryProperty start="\[" end="\]"
|
||||
syntax match dtsStringProperty "\".*\""
|
||||
syntax match dtsKeyword "/.\{-1,\}/"
|
||||
syntax match dtsKeyword "/[[:alpha:][:digit:]-]\+/\([[:space:]]\|;\)"he=e-1
|
||||
syntax match dtsLabel "^[[:space:]]*[[:alpha:][:digit:]_]\+:"
|
||||
syntax match dtsNode /[[:alpha:][:digit:]-_]\+\(@[0-9a-fA-F]\+\|\)[[:space:]]*{/he=e-1
|
||||
syntax region dtsCellProperty start="<" end=">" contains=dtsReference,dtsBinaryProperty,dtsStringProperty,dtsComment
|
||||
|
||||
15
runtime/syntax/luau.vim
Normal file
15
runtime/syntax/luau.vim
Normal file
@@ -0,0 +1,15 @@
|
||||
" Vim syntax file
|
||||
" Language: Luau
|
||||
" Maintainer: None yet
|
||||
" Last Change: 2023 Apr 30
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Luau is a superset of lua
|
||||
runtime! syntax/lua.vim
|
||||
|
||||
let b:current_syntax = "luau"
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8 noet:
|
||||
@@ -3,8 +3,12 @@
|
||||
" 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), Peter Stanhope <dev.rptr@gmail.com> (Add missing 64-bit mode registers)
|
||||
" Last Change: 2017 Jan 23
|
||||
" Contributors:
|
||||
" Leonard König <leonard.r.koenig@gmail.com> (C string highlighting),
|
||||
" Peter Stanhope <dev.rptr@gmail.com> (Add missing 64-bit mode registers)
|
||||
" Frédéric Hamel <rederic.hamel123@gmail.com> (F16c support, partial AVX
|
||||
" support, other)
|
||||
" Last Change: 2022 May 3
|
||||
" NASM Home: http://www.nasm.us/
|
||||
|
||||
|
||||
@@ -277,7 +281,7 @@ syn match nasmInstrModifier "\<F\(ADD\|MUL\|\(DIV\|SUB\)R\=\)\s\+TO\>"lc=5,ms=
|
||||
" NAsm directives
|
||||
syn keyword nasmRepeat TIMES
|
||||
syn keyword nasmDirective ALIGN[B] INCBIN EQU NOSPLIT SPLIT
|
||||
syn keyword nasmDirective ABSOLUTE BITS SECTION SEGMENT
|
||||
syn keyword nasmDirective ABSOLUTE BITS SECTION SEGMENT DEFAULT
|
||||
syn keyword nasmDirective ENDSECTION ENDSEGMENT
|
||||
syn keyword nasmDirective __SECT__
|
||||
" Macro created standard directives: (requires %include)
|
||||
@@ -309,7 +313,7 @@ syn match nasmStdInstruction "\<\(CMOV\|J\|SET\)\(N\=\([ABGL]E\=\|[CEOSZ]\)\|P
|
||||
syn match nasmStdInstruction "\<POP\>"
|
||||
syn keyword nasmStdInstruction AAA AAD AAM AAS ADC ADD AND
|
||||
syn keyword nasmStdInstruction BOUND BSF BSR BSWAP BT[C] BTR BTS
|
||||
syn keyword nasmStdInstruction CALL CBW CDQ CLC CLD CMC CMP CMPSB CMPSD CMPSW CMPSQ
|
||||
syn keyword nasmStdInstruction CALL CBW CDQ CDQE CLC CLD CMC CMP CMPSB CMPSD CMPSW CMPSQ
|
||||
syn keyword nasmStdInstruction CMPXCHG CMPXCHG8B CPUID CWD[E] CQO
|
||||
syn keyword nasmStdInstruction DAA DAS DEC DIV ENTER
|
||||
syn keyword nasmStdInstruction IDIV IMUL INC INT[O] IRET[D] IRETW IRETQ
|
||||
@@ -319,6 +323,7 @@ syn keyword nasmStdInstruction LODSW LOOP[E] LOOPNE LOOPNZ LOOPZ LSS
|
||||
syn keyword nasmStdInstruction MOVSB MOVSD MOVSW MOVSX MOVSQ MOVZX MUL NEG NOP NOT
|
||||
syn keyword nasmStdInstruction OR POPA[D] POPAW POPF[D] POPFW POPFQ
|
||||
syn keyword nasmStdInstruction PUSH[AD] PUSHAW PUSHF[D] PUSHFW PUSHFQ
|
||||
syn keyword nasmStdInstruction PAUSE
|
||||
syn keyword nasmStdInstruction RCL RCR RETF RET[N] ROL ROR
|
||||
syn keyword nasmStdInstruction SAHF SAL SAR SBB SCASB SCASD SCASW
|
||||
syn keyword nasmStdInstruction SHL[D] SHR[D] STC STD STOSB STOSD STOSW STOSQ SUB
|
||||
@@ -405,6 +410,62 @@ syn keyword nasmSseInstruction ORPS RCPPS RCPSS RSQRTPS RSQRTSS
|
||||
syn keyword nasmSseInstruction SHUFPS SQRTPS SQRTSS STMXCSR SUBPS SUBSS
|
||||
syn keyword nasmSseInstruction UCOMISS UNPCKHPS UNPCKLPS XORPS
|
||||
|
||||
" F16c Instructions
|
||||
syn keyword nasmF16CInstruction VCVTPH2PS VCVTPS2PH
|
||||
|
||||
" AVX Instructions
|
||||
syn keyword nasmAVXInstruction VCVTDQ2PD VCVTDQ2PS VCVTPD2DQ VCVTPD2P VCVTPD2PS
|
||||
syn keyword nasmAVXInstruction VCVTPS2DQ VCVTPS2PD
|
||||
syn keyword nasmAVXInstruction VCVTSD2SI VCVTSD2SS VCVTSI2SD VCVTSI2SS VCVTSS2SD VCVTSS2SI
|
||||
syn keyword nasmAVXInstruction VMAXPS VMAXSS VMINPS VMINSS VMOVAPS VMOVHLPS VMOVHPS
|
||||
syn keyword nasmAVXInstruction VMAXPD VMAXSD VMINPD VMINSD VMOVAPD VMOVHLPD VMOVHPD
|
||||
syn keyword nasmAVXInstruction VMOVLHPS VMOVLPS VMOVMSKPS VMOVNTPS VMOVSS VMOVUPS
|
||||
syn keyword nasmAVXInstruction VMULPS VMULSS VPXOR
|
||||
|
||||
syn match nasmInstructnError "\<VP\a\{3}R\a\>"
|
||||
syn match nasmAVXInstruction "\<VP\(INS\|EXT\)R[BDQW]\>"
|
||||
|
||||
syn keyword nasmAVXInstruction VORPS VPABSB VPABSD VPABSW
|
||||
syn keyword nasmAVXInstruction PACKSSDW VPACKSSWB VPACKUSDW VPACKUSWB VPADDD
|
||||
syn keyword nasmAVXInstruction PADDQ VPADDSB VPADDSW VPADDUSB VPADDUSW
|
||||
syn keyword nasmAVXInstruction PADDW VPALIGNR VPAND VPANDN VPAVGB
|
||||
syn keyword nasmAVXInstruction PAVGW VPBLENDD VPBLENDVB VPBLENDW VPBROADCASTB
|
||||
syn keyword nasmAVXInstruction PBROADCASTD VPBROADCASTQ VPBROADCASTW VPCLMULQDQ VPCMOV
|
||||
syn keyword nasmAVXInstruction PCMPEQB VPCMPEQD VPCMPEQQ VPCMPEQW VPCMPESTRI
|
||||
syn keyword nasmAVXInstruction PCMPESTRM VPCMPGTB VPCMPGTD VPCMPGTQ VPCMPGTW
|
||||
syn keyword nasmAVXInstruction PCMPISTRI VPCMPISTRM VPCOMB VPCOMD VPCOMQ
|
||||
syn keyword nasmAVXInstruction PCOMUB VPCOMUD VPCOMUQ VPCOMUW VPCOMW
|
||||
syn keyword nasmAVXInstruction PERM2FVPERM2IVPERMD VPERMIL2PD VPERMIL2PS VPERMILPD VPERMILPS
|
||||
syn keyword nasmAVXInstruction PERMPD VPERMPS VPERMQ VPEXTRB VPEXTRD
|
||||
syn keyword nasmAVXInstruction PEXTRQ VPEXTRW VPGATHERDD VPGATHERDQ VPGATHERQD
|
||||
syn keyword nasmAVXInstruction PGATHERQQ VPHADDBD VPHADDBQ VPHADDBW VPHADDD
|
||||
syn keyword nasmAVXInstruction PHADDDQ VPHADDSW VPHADDUBQ VPHADDUBW VPHADDUDQ
|
||||
syn keyword nasmAVXInstruction PHADDUWD VPHADDUWQ VPHADDW VPHADDWD VPHADDWQ
|
||||
syn keyword nasmAVXInstruction PHMINPOSUW VPHSUBBW VPHSUBD VPHSUBDQ VPHSUBSW
|
||||
syn keyword nasmAVXInstruction PHSUBW VPHSUBWD VPINSRB VPINSRD VPINSRQ
|
||||
syn keyword nasmAVXInstruction PINSRW VPMACSDD VPMACSDQH
|
||||
syn keyword nasmAVXInstruction VPMACSDQL VPMACSSDD VPMACSSDQL VPMACSSQH VPMACSSWD
|
||||
syn keyword nasmAVXInstruction VPMACSSWW VPMACSWD VPMACSWW VPMADCSSWD VPMADCSWD
|
||||
syn keyword nasmAVXInstruction VPMADDUBSW VPMADDWD VPMASKMOVD VPMASKMOVQ VPMAXSB
|
||||
syn keyword nasmAVXInstruction VPMAXSD VPMAXSW VPMAXUB VPMAXUD VPMAXUW
|
||||
syn keyword nasmAVXInstruction VPMINSB VPMINSD VPMINSW VPMINUB VPMINUD
|
||||
syn keyword nasmAVXInstruction VPMINUW VPMOVMSKB VPMOVSXBD VPMOVSXBQ VPMOVSXBW
|
||||
syn keyword nasmAVXInstruction VPMOVSXDQ VPMOVSXWD VPMOVSXWQ VPMOVZXBD VPMOVZXBQ
|
||||
syn keyword nasmAVXInstruction VPMOVZXBW VPMOVZXDQ VPMOVZXWD VPMOVZXWQ VPMULDQ
|
||||
syn keyword nasmAVXInstruction VPMULHRSW VPMULHUW VPMULHW VPMULLD VPMULLW
|
||||
syn keyword nasmAVXInstruction VPMULUDQ VPOR VPPERM VPROTB VPROTD
|
||||
syn keyword nasmAVXInstruction VPROTQ VPROTW VPSADBW VPSHAB VPSHAD
|
||||
syn keyword nasmAVXInstruction VPSHAQ VPSHAW VPSHLB VPSHLD VPSHLQ
|
||||
syn keyword nasmAVXInstruction VPSHLW VPSHUFB VPSHUFD VPSHUFHW VPSHUFLW
|
||||
syn keyword nasmAVXInstruction VPSIGNB VPSIGND VPSIGNW VPSLLD VPSLLDQ
|
||||
syn keyword nasmAVXInstruction VPSLLQ VPSLLVD VPSLLVQ VPSLLW VPSRAD
|
||||
syn keyword nasmAVXInstruction VPSRAVD VPSRAW VPSRLD VPSRLDQ VPSRLQ
|
||||
syn keyword nasmAVXInstruction VPSRLVD VPSRLVQ VPSRLW VPSUBB VPSUBD
|
||||
syn keyword nasmAVXInstruction VPSUBQ VPSUBSB VPSUBSW VPSUBUSB VPSUBUSW
|
||||
syn keyword nasmAVXInstruction VPSUBW VPTEST VPUNPCKHBW VPUNPCKHDQ VPUNPCKHQDQ
|
||||
syn keyword nasmAVXInstruction VPUNPCKHWD VPUNPCKLBW VPUNPCKLDQ VPUNPCKLQDQ VPUNPCKLWD
|
||||
syn keyword nasmAVXInstruction VPXOR VRCPPS
|
||||
|
||||
|
||||
" Three Dimensional Now Packed Instructions: (requires 3DNow! unit)
|
||||
syn keyword nasmNowInstruction FEMMS PAVGUSB PF2ID PFACC PFADD PFCMPEQ PFCMPGE
|
||||
@@ -515,13 +576,14 @@ hi def link nasmDbgInstruction Debug
|
||||
hi def link nasmFpuInstruction Statement
|
||||
hi def link nasmMmxInstruction Statement
|
||||
hi def link nasmSseInstruction Statement
|
||||
hi def link nasmF16cInstruction Statement
|
||||
hi def link nasmAVXInstruction Statement
|
||||
hi def link nasmNowInstruction Statement
|
||||
hi def link nasmAmdInstruction Special
|
||||
hi def link nasmCrxInstruction Special
|
||||
hi def link nasmUndInstruction Todo
|
||||
hi def link nasmInstructnError Error
|
||||
|
||||
|
||||
let b:current_syntax = "nasm"
|
||||
|
||||
" vim:ts=8 sw=4
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim 9.0 script
|
||||
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
|
||||
" Last Change: April 13, 2023
|
||||
" Version: 9.0-24
|
||||
" Last Change: May 09, 2023
|
||||
" Version: 9.0-25
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
|
||||
" Automatically generated keyword lists: {{{1
|
||||
|
||||
@@ -19,13 +19,13 @@ syn keyword vimTodo contained COMBAK FIXME TODO XXX
|
||||
syn cluster vimCommentGroup contains=vimTodo,@Spell
|
||||
|
||||
" regular vim commands {{{2
|
||||
syn keyword vimCommand contained a ar[gs] argl[ocal] bad[d] bm[odified] breaka[dd] bun[load] cabc[lear] cal[l] cc cf[ile] changes cla[st] cnew[er] com cope[n] cscope debug delel delf[unction] dif[fupdate] difft[his] dli[st] ds[earch] echoc[onsole] elsei[f] endf[unction] enum exu[sage] fin[d] foldc[lose] go[to] ha[rdcopy] hid[e] if in iuna[bbrev] keepalt la[st] lan[guage] lbo[ttom] ld[o] lfdo lgrepa[dd] lma lo[adview] lop[en] lua m[ove] mes[sages] mod[e] nbs[tart] nor omapc[lear] packl[oadall] popu[p] profd[el] ptf[irst] pts[elect] py3f[ile] pythonx quita[ll] redraws[tatus] rew[ind] rubyf[ile] sIg sa[rgument] sba[ll] sbr[ewind] scl scscope sfir[st] sgl sic sin sm[ap] snoreme spelld[ump] spellw[rong] srg sta[g] stopi[nsert] sunmenu sync tab tabfir[st] tabp[revious] tcl th[row] tlnoremenu tn[ext] ts[elect] undoj[oin] up[date] vie[w] vne[w] win[size] wq xmapc[lear] xr[estore]
|
||||
syn keyword vimCommand contained ab arga[dd] argu[ment] balt bn[ext] breakd[el] bw[ipeout] cabo[ve] cat[ch] ccl[ose] cfdo chd[ir] class cnf[ile] comc[lear] cp[revious] cstag debugg[reedy] delep dell diffg[et] dig[raphs] do dsp[lit] echoe[rr] em[enu] endfo[r] eval f[ile] fina[lly] foldd[oopen] gr[ep] helpc[lose] his[tory] ij[ump] inor j[oin] keepj[umps] lab[ove] lat lc[d] le[ft] lfir[st] lh[elpgrep] lmak[e] loadk lp[revious] luado ma[rk] mk[exrc] mz[scheme] new nore on[ly] pc[lose] pp[op] promptf[ind] ptj[ump] pu[t] py3f[ile] pyx r[ead] redrawt[abline] ri[ght] rundo sIl sal[l] sbf[irst] sc scp se[t] sg sgn sie sip sme snoremenu spelli[nfo] spr[evious] sri star[tinsert] sts[elect] sus[pend] syncbind tabN[ext] tabl[ast] tabr[ewind] tcld[o] tj[ump] tlu tno[remap] tu[nmenu] undol[ist] v vim9[cmd] vs[plit] winc[md] wqa[ll] xme xunme
|
||||
syn keyword vimCommand contained abc[lear] argd[elete] as[cii] bd[elete] bo[tright] breakl[ist] cN[ext] cad[dbuffer] cb[uffer] cd cfir[st] che[ckpath] cle[arjumps] cnor comp[iler] cpf[ile] cun def deletel delm[arks] diffo[ff] dir doau e[dit] echom[sg] en[dif] endinterface ex files fini[sh] folddoc[losed] grepa[dd] helpf[ind] hor[izontal] il[ist] interface ju[mps] keepp[atterns] lad[dexpr] later lch[dir] lefta[bove] lg[etfile] lhi[story] lmapc[lear] loadkeymap lpf[ile] luafile mak[e] mks[ession] mzf[ile] nmapc[lear] nos[wapfile] opt[ions] pe[rl] pre[serve] promptr[epl] ptl[ast] public py[thon] pyxdo rec[over] reg[isters] rightb[elow] rv[iminfo] sIn san[dbox] sbl[ast] scI scr[iptnames] setf[iletype] sgI sgp sig sir smenu so[urce] spellr[are] sr srl startg[replace] substitutepattern sv[iew] syntime tabc[lose] tabm[ove] tabs tclf[ile] tl[ast] tlunmenu to[pleft] tunma[p] unh[ide] ve[rsion] vim9s[cript] wN[ext] windo wundo xmenu xunmenu
|
||||
syn keyword vimCommand contained abo[veleft] argded[upe] au bel[owright] bp[revious] bro[wse] cNf[ile] cadde[xpr] cbe[fore] cdo cg[etfile] checkt[ime] clo[se] co[py] con[tinue] cq[uit] cuna[bbrev] defc[ompile] deletep delp diffp[atch] disa[ssemble] doaut ea echon endclass endt[ry] exi[t] filet fir[st] foldo[pen] gui helpg[rep] i imapc[lear] intro k lN[ext] laddb[uffer] lb[uffer] lcl[ose] leg[acy] lgetb[uffer] ll lne[xt] loc[kmarks] lr[ewind] lv[imgrep] marks mksp[ell] n[ext] noa nu[mber] ownsyntax ped[it] prev[ious] ps[earch] ptn[ext] pw[d] pydo pyxfile red[o] res[ize] ru[ntime] sI sIp sav[eas] sbm[odified] sce scripte[ncoding] setg[lobal] sgc sgr sign sl[eep] smile sor[t] spellr[epall] srI srn startr[eplace] substituterepeat sw[apname] t tabd[o] tabn[ext] tags te[aroff] tlm tm[enu] tp[revious] type unl verb[ose] vim[grep] w[rite] winp[os] wv[iminfo] xnoreme xwininfo
|
||||
syn keyword vimCommand contained abstract argdo bN[ext] bf[irst] br[ewind] bufdo c[hange] caddf[ile] cbel[ow] ce[nter] cgetb[uffer] chi[story] cmapc[lear] col[der] conf[irm] cr[ewind] cw[indow] defer deletl dep diffpu[t] dj[ump] dp earlier echow[indow] enddef endw[hile] exp filetype fix[del] for gvim helpt[ags] ia imp is[earch] kee[pmarks] lNf[ile] laddf[ile] lbe[fore] lcs lex[pr] lgete[xpr] lla[st] lnew[er] lockv[ar] ls lvimgrepa[dd] mat[ch] mkv[imrc] nb[key] noautocmd o[pen] p[rint] perld[o] pro ptN[ext] ptp[revious] py3 pyf[ile] q[uit] redi[r] ret[ab] rub[y] sIc sIr sbN[ext] sbn[ext] scg scriptv[ersion] setl[ocal] sge sh[ell] sil[ent] sla[st] sn[ext] sp[lit] spellr[rare] src srp static sun[hide] sy tN[ext] tabe[dit] tabnew tc[d] ter[minal] tlmenu tma[p] tr[ewind] u[ndo] unlo[ckvar] vert[ical] vimgrepa[dd] wa[ll] wn[ext] x[it] xnoremenu y[ank]
|
||||
syn keyword vimCommand contained addd arge[dit] b[uffer] bl[ast] brea[k] buffers ca caf[ter] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cn[ext] colo[rscheme] cons[t] cs d[elete] delc[ommand] deletp di[splay] diffs[plit] dl dr[op] ec el[se] endenum ene[w] export filt[er] fo[ld] fu[nction] h[elp] hi iabc[lear] import isp[lit] keepa l[ist] laf[ter] lbel[ow] lcscope lf[ile] lgr[ep] lli[st] lnf[ile] lol[der] lt[ag] lw[indow] menut[ranslate] mkvie[w] nbc[lose] noh[lsearch] ol[dfiles] pa[ckadd] po[p] prof[ile] pta[g] ptr[ewind] py3do python3 qa[ll] redr[aw] retu[rn] rubyd[o] sIe sN[ext] sb[uffer] sbp[revious] sci scs sf[ind] sgi si sim[alt] sm[agic] sno[magic] spe[llgood] spellu[ndo] sre[wind] st[op] stj[ump] sunme syn ta[g] tabf[ind] tabo[nly] tch[dir] tf[irst] tln tmapc[lear] try una[bbreviate] uns[ilent] vi[sual] viu[sage] wh[ile] wp[revious] xa[ll] xprop z[^.=]
|
||||
syn keyword vimCommand contained al[l] argg[lobal] ba[ll]
|
||||
syn keyword vimCommand contained a ar[gs] argl[ocal] bad[d] bn[ext] breakd[el] bw[ipeout] cabo[ve] cat[ch] ccl[ose] cfdo chd[ir] class cnf[ile] comc[lear] cp[revious] cstag debugg[reedy] delep dell diffg[et] dig[raphs] do dsp[lit] echoe[rr] em[enu] endfo[r] eval f[ile] fina[lly] foldd[oopen] gr[ep] helpc[lose] his[tory] ij[ump] inor j[oin] keepj[umps] lab[ove] lat lc[d] le[ft] lfir[st] lh[elpgrep] lmak[e] loadk lp[revious] luado ma[rk] mk[exrc] mz[scheme] new nore on[ly] pc[lose] pp[op] promptf[ind] ptj[ump] pu[t] py3f[ile] pyx r[ead] redrawt[abline] ri[ght] rundo sIl sal[l] sbf[irst] sc scp se[t] sg sgn sie sip sme snoremenu spelli[nfo] spr[evious] sri star[tinsert] sts[elect] sus[pend] syncbind tabN[ext] tabl[ast] tabr[ewind] tcld[o] tj[ump] tlu tno[remap] tu[nmenu] undol[ist] v vim9[cmd] vs[plit] win[size] wq xmapc[lear] xr[estore]
|
||||
syn keyword vimCommand contained ab arga[dd] argu[ment] balt bo[tright] breakl[ist] cN[ext] cad[dbuffer] cb[uffer] cd cfir[st] che[ckpath] cle[arjumps] cnor comp[iler] cpf[ile] cun def deletel delm[arks] diffo[ff] dir doau e[dit] echom[sg] en[dif] endinterface ex files fini[sh] folddoc[losed] grepa[dd] helpf[ind] hor[izontal] il[ist] interface ju[mps] keepp[atterns] lad[dexpr] later lch[dir] lefta[bove] lg[etfile] lhi[story] lmapc[lear] loadkeymap lpf[ile] luafile mak[e] mks[ession] mzf[ile] nmapc[lear] nos[wapfile] opt[ions] pe[rl] pre[serve] promptr[epl] ptl[ast] public py[thon] pyxdo rec[over] reg[isters] rightb[elow] rv[iminfo] sIn san[dbox] sbl[ast] scI scr[iptnames] setf[iletype] sgI sgp sig sir smenu so[urce] spellr[are] sr srl startg[replace] substitutepattern sv[iew] syntime tabc[lose] tabm[ove] tabs tclf[ile] tl[ast] tlunmenu to[pleft] tunma[p] unh[ide] ve[rsion] vim9s[cript] wN[ext] winc[md] wqa[ll] xme xunme
|
||||
syn keyword vimCommand contained abc[lear] argd[elete] as[cii] bd[elete] bp[revious] bro[wse] cNf[ile] cadde[xpr] cbe[fore] cdo cg[etfile] checkt[ime] clo[se] co[py] con[tinue] cq[uit] cuna[bbrev] defc[ompile] deletep delp diffp[atch] disa[ssemble] doaut ea echon endclass endt[ry] exi[t] filet fir[st] foldo[pen] gui helpg[rep] i imapc[lear] intro k lN[ext] laddb[uffer] lb[uffer] lcl[ose] leg[acy] lgetb[uffer] ll lne[xt] loc[kmarks] lr[ewind] lv[imgrep] marks mksp[ell] n[ext] noa nu[mber] ownsyntax ped[it] prev[ious] ps[earch] ptn[ext] pw[d] pydo pyxfile red[o] res[ize] ru[ntime] sI sIp sav[eas] sbm[odified] sce scripte[ncoding] setg[lobal] sgc sgr sign sl[eep] smile sor[t] spellr[epall] srI srn startr[eplace] substituterepeat sw[apname] t tabd[o] tabn[ext] tags te[aroff] tlm tm[enu] tp[revious] type unl verb[ose] vim[grep] w[rite] windo wundo xmenu xunmenu
|
||||
syn keyword vimCommand contained abo[veleft] argded[upe] au bel[owright] br[ewind] bufdo c[hange] caddf[ile] cbel[ow] ce[nter] cgetb[uffer] chi[story] cmapc[lear] col[der] conf[irm] cr[ewind] cw[indow] defer deletl dep diffpu[t] dj[ump] dp earlier echow[indow] enddef endw[hile] exp filetype fix[del] for gvim helpt[ags] ia imp is[earch] kee[pmarks] lNf[ile] laddf[ile] lbe[fore] lcs lex[pr] lgete[xpr] lla[st] lnew[er] lockv[ar] ls lvimgrepa[dd] mat[ch] mkv[imrc] nb[key] noautocmd o[pen] p[rint] perld[o] pro ptN[ext] ptp[revious] py3 pyf[ile] q[uit] redi[r] ret[ab] rub[y] sIc sIr sbN[ext] sbn[ext] scg scriptv[ersion] setl[ocal] sge sh[ell] sil[ent] sla[st] sn[ext] sp[lit] spellr[rare] src srp static sun[hide] sy tN[ext] tabe[dit] tabnew tc[d] ter[minal] tlmenu tma[p] tr[ewind] u[ndo] unlo[ckvar] vert[ical] vimgrepa[dd] wa[ll] winp[os] wv[iminfo] xnoreme xwininfo
|
||||
syn keyword vimCommand contained abstract argdo bN[ext] bf[irst] brea[k] buffers ca caf[ter] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cn[ext] colo[rscheme] cons[t] cs d[elete] delc[ommand] deletp di[splay] diffs[plit] dl dr[op] ec el[se] endenum ene[w] export filt[er] fo[ld] fu[nction] h[elp] hi iabc[lear] import isp[lit] keepa l[ist] laf[ter] lbel[ow] lcscope lf[ile] lgr[ep] lli[st] lnf[ile] lol[der] lt[ag] lw[indow] menut[ranslate] mkvie[w] nbc[lose] noh[lsearch] ol[dfiles] pa[ckadd] po[p] prof[ile] pta[g] ptr[ewind] py3do python3 qa[ll] redr[aw] retu[rn] rubyd[o] sIe sN[ext] sb[uffer] sbp[revious] sci scs sf[ind] sgi si sim[alt] sm[agic] sno[magic] spe[llgood] spellu[ndo] sre[wind] st[op] stj[ump] sunme syn ta[g] tabf[ind] tabo[nly] tch[dir] tf[irst] tln tmapc[lear] try una[bbreviate] uns[ilent] vi[sual] viu[sage] wh[ile] wn[ext] x[it] xnoremenu y[ank]
|
||||
syn keyword vimCommand contained addd arge[dit] b[uffer] bl[ast] breaka[dd] bun[load] cabc[lear] cal[l] cc cf[ile] changes cla[st] cnew[er] com cope[n] cscope debug delel delf[unction] dif[fupdate] difft[his] dli[st] ds[earch] echoc[onsole] elsei[f] endf[unction] enum exu[sage] fin[d] foldc[lose] go[to] ha[rdcopy] hid[e] if in iuna[bbrev] keepalt la[st] lan[guage] lbo[ttom] ld[o] lfdo lgrepa[dd] lma lo[adview] lop[en] lua m[ove] mes[sages] mod[e] nbs[tart] nor omapc[lear] packl[oadall] popu[p] profd[el] ptf[irst] pts[elect] py3f[ile] pythonx quita[ll] redraws[tatus] rew[ind] rubyf[ile] sIg sa[rgument] sba[ll] sbr[ewind] scl scscope sfir[st] sgl sic sin sm[ap] snoreme spelld[ump] spellw[rong] srg sta[g] stopi[nsert] sunmenu sync tab tabfir[st] tabp[revious] tcl th[row] tlnoremenu tn[ext] ts[elect] undoj[oin] up[date] vie[w] vne[w] wi wp[revious] xa[ll] xprop z[^.=]
|
||||
syn keyword vimCommand contained al[l] argg[lobal] ba[ll] bm[odified]
|
||||
syn match vimCommand contained "\<z[-+^.=]\=\>"
|
||||
syn keyword vimStdPlugin contained Arguments Asm Break Cfilter Clear Continue DiffOrig Evaluate Finish Gdb Lfilter Man N[ext] Over P[rint] Program Run S Source Step Stop Termdebug TermdebugCommand TOhtml Until Winbar XMLent XMLns
|
||||
|
||||
@@ -79,12 +79,12 @@ syn match vimHLGroup contained "Conceal"
|
||||
syn case match
|
||||
|
||||
" Function Names {{{2
|
||||
syn keyword vimFuncName contained abs argc assert_equal assert_match atan balloon_show bufexists bufwinid ceil ch_canread ch_getbufnr ch_read ch_status complete_check count deletebufline digraph_set eval exists_compiled extendnew findfile fnameescape foldtextresult get getchangelist getcmdcompltype getcompletion getfperm getline getpid getscriptinfo getwininfo glob2regpat histadd hlID indexof inputsecret isinf job_setoptions js_encode libcall list2str log10 mapnew matchdelete matchstrpos mzeval popup_atcursor popup_dialog popup_findpreview popup_locate popup_settext prompt_getprompt prop_add_list prop_type_add pum_getpos rand readfile reltimefloat remote_read repeat screenattr screenrow searchpair setbufline setcmdline setline setreg sha256 sign_getplaced sign_unplace slice sound_playfile sqrt str2nr strftime strpart submatch synconcealed system tagfiles term_dumpdiff term_getattr term_getsize term_list term_setkill test_alloc_fail test_getvalue test_null_channel test_null_partial test_setmouse timer_info tolower type values winbufnr win_getid win_id2win winnr win_splitmove
|
||||
syn keyword vimFuncName contained acos argidx assert_equalfile assert_nobeep atan2 balloon_split buflisted bufwinnr changenr ch_close ch_getjob ch_readblob cindent complete_info cscope_connection did_filetype digraph_setlist eventhandler exp feedkeys flatten fnamemodify foreground getbufinfo getchar getcmdline getcurpos getfsize getloclist getpos gettabinfo getwinpos globpath histdel hlset input insert islocked job_start json_decode libcallnr listener_add luaeval mapset matchend max nextnonblank popup_beval popup_filter_menu popup_getoptions popup_menu popup_show prompt_setcallback prop_clear prop_type_change pumvisible range reduce reltimestr remote_send resolve screenchar screenstring searchpairpos setbufvar setcmdpos setloclist settabvar shellescape sign_jump sign_unplacelist sort sound_stop srand strcharlen strgetchar strptime substitute synID systemlist taglist term_dumpload term_getcursor term_getstatus term_scrape term_setrestore test_autochdir test_gui_event test_null_dict test_null_string test_settime timer_pause toupper typename virtcol wincol win_gettype winlayout winrestcmd winwidth
|
||||
syn keyword vimFuncName contained add arglistid assert_exception assert_notequal autocmd_add blob2list bufload byte2line char2nr ch_close_in ch_info ch_readraw clearmatches confirm cursor diff_filler echoraw executable expand filereadable flattennew foldclosed fullcommand getbufline getcharmod getcmdpos getcursorcharpos getftime getmarklist getqflist gettabvar getwinposx has histget hostname inputdialog interrupt isnan job_status json_encode line listener_flush map match matchfuzzy menu_info nr2char popup_clear popup_filter_yesno popup_getpos popup_move pow prompt_setinterrupt prop_find prop_type_delete py3eval readblob reg_executing remote_expr remote_startserver reverse screenchars search searchpos setcellwidths setcursorcharpos setmatches settabwinvar shiftwidth sign_place simplify sound_clear spellbadword state strcharpart stridx strridx swapfilelist synIDattr tabpagebuflist tan term_dumpwrite term_getjob term_gettitle term_sendkeys term_setsize test_feedinput test_ignore_error test_null_function test_option_not_set test_srand_seed timer_start tr undofile virtcol2col windowsversion win_gotoid winline winrestview wordcount
|
||||
syn keyword vimFuncName contained and argv assert_fails assert_notmatch autocmd_delete browse bufloaded byteidx charclass chdir ch_log ch_sendexpr col copy debugbreak diff_hlID empty execute expandcmd filewritable float2nr foldclosedend funcref getbufoneline getcharpos getcmdscreenpos getcwd getftype getmatches getreg gettabwinvar getwinposy has_key histnr iconv inputlist invert items job_stop keys line2byte listener_remove maparg matchadd matchfuzzypos min or popup_close popup_findecho popup_hide popup_notification prevnonblank prompt_setprompt prop_list prop_type_get pyeval readdir reg_recording remote_foreground remove round screencol searchcount server2client setcharpos setenv setpos settagstack sign_define sign_placelist sin soundfold spellsuggest str2float strchars string strtrans swapinfo synIDtrans tabpagenr tanh term_getaltscreen term_getline term_gettty term_setansicolors term_start test_garbagecollect_now test_mswin_event test_null_job test_override test_unknown timer_stop trim undotree visualmode win_execute winheight win_move_separator winsaveview writefile
|
||||
syn keyword vimFuncName contained append asin assert_false assert_report autocmd_get browsedir bufname byteidxcomp charcol ch_evalexpr ch_logfile ch_sendraw complete cos deepcopy digraph_get environ exepath expr10 filter floor foldlevel function getbufvar getcharsearch getcmdtype getenv getimstatus getmousepos getreginfo gettagstack getwinvar haslocaldir hlexists indent inputrestore isabsolutepath job_getchannel join keytrans lispindent localtime mapcheck matchaddpos matchlist mkdir pathshorten popup_create popup_findinfo popup_list popup_setoptions printf prop_add prop_remove prop_type_list pyxeval readdirex reltime remote_peek rename rubyeval screenpos searchdecl serverlist setcharsearch setfperm setqflist setwinvar sign_getdefined sign_undefine sinh sound_playevent split str2list strdisplaywidth strlen strwidth swapname synstack tabpagewinnr tempname term_getansicolors term_getscrolled terminalprops term_setapi term_wait test_garbagecollect_soon test_null_blob test_null_list test_refcount test_void timer_stopall trunc uniq wildmenumode win_findbuf win_id2tabwin win_move_statusline win_screenpos xor
|
||||
syn keyword vimFuncName contained appendbufline assert_beeps assert_inrange assert_true balloon_gettext bufadd bufnr call charidx ch_evalraw ch_open ch_setoptions complete_add cosh delete digraph_getlist escape exists extend finddir fmod foldtext garbagecollect getcellwidths getcharstr getcmdwintype getfontname getjumplist getmouseshape getregtype gettext glob hasmapto hlget index inputsave isdirectory job_info js_decode len list2blob log maplist matcharg matchstr mode perleval
|
||||
syn keyword vimFuncName contained abs argc assert_equal assert_match atan balloon_show bufexists bufwinid ceil ch_canread ch_getbufnr ch_read ch_status complete_check count deletebufline digraph_set eval exists_compiled extendnew findfile fnameescape foldtextresult get getchangelist getcmdcompltype getcompletion getfperm getline getpid getscriptinfo getwininfo glob2regpat histadd hlID indexof inputsecret isinf job_setoptions js_encode libcall list2str log10 mapnew matchdelete matchstrpos mzeval popup_atcursor popup_filter_menu popup_getpos popup_move pow prompt_setinterrupt prop_find prop_type_delete py3eval readblob reg_executing remote_expr remote_startserver reverse screenchars search searchpos setcellwidths setcursorcharpos setmatches settabwinvar shiftwidth sign_place simplify sound_clear spellbadword state strcharpart stridx strridx substitute synID systemlist taglist term_dumpload term_getcursor term_getstatus term_scrape term_setrestore test_autochdir test_gui_event test_null_dict test_null_string test_settime timer_pause toupper typename values winbufnr win_getid win_id2win winnr win_splitmove
|
||||
syn keyword vimFuncName contained acos argidx assert_equalfile assert_nobeep atan2 balloon_split buflisted bufwinnr changenr ch_close ch_getjob ch_readblob cindent complete_info cscope_connection did_filetype digraph_setlist eventhandler exp feedkeys flatten fnamemodify foreground getbufinfo getchar getcmdline getcurpos getfsize getloclist getpos gettabinfo getwinpos globpath histdel hlset input insert islocked job_start json_decode libcallnr listener_add luaeval mapset matchend max nextnonblank popup_beval popup_filter_yesno popup_hide popup_notification prevnonblank prompt_setprompt prop_list prop_type_get pyeval readdir reg_recording remote_foreground remove round screencol searchcount server2client setcharpos setenv setpos settagstack sign_define sign_placelist sin soundfold spellsuggest str2float strchars string strtrans swapfilelist synIDattr tabpagebuflist tan term_dumpwrite term_getjob term_gettitle term_sendkeys term_setsize test_feedinput test_ignore_error test_null_function test_option_not_set test_srand_seed timer_start tr undofile virtcol wincol win_gettype winlayout winrestcmd winwidth
|
||||
syn keyword vimFuncName contained add arglistid assert_exception assert_notequal autocmd_add blob2list bufload byte2line char2nr ch_close_in ch_info ch_readraw clearmatches confirm cursor diff_filler echoraw executable expand filereadable flattennew foldclosed fullcommand getbufline getcharmod getcmdpos getcursorcharpos getftime getmarklist getqflist gettabvar getwinposx has histget hostname inputdialog interrupt isnan job_status json_encode line listener_flush map match matchfuzzy menu_info nr2char popup_clear popup_findecho popup_list popup_setoptions printf prop_add prop_remove prop_type_list pyxeval readdirex reltime remote_peek rename rubyeval screenpos searchdecl serverlist setcharsearch setfperm setqflist setwinvar sign_getdefined sign_undefine sinh sound_playevent split str2list strdisplaywidth strlen strutf16len swapinfo synIDtrans tabpagenr tanh term_getaltscreen term_getline term_gettty term_setansicolors term_start test_garbagecollect_now test_mswin_event test_null_job test_override test_unknown timer_stop trim undotree virtcol2col windowsversion win_gotoid winline winrestview wordcount
|
||||
syn keyword vimFuncName contained and argv assert_fails assert_notmatch autocmd_delete browse bufloaded byteidx charclass chdir ch_log ch_sendexpr col copy debugbreak diff_hlID empty execute expandcmd filewritable float2nr foldclosedend funcref getbufoneline getcharpos getcmdscreenpos getcwd getftype getmatches getreg gettabwinvar getwinposy has_key histnr iconv inputlist invert items job_stop keys line2byte listener_remove maparg matchadd matchfuzzypos min or popup_close popup_findinfo popup_locate popup_settext prompt_getprompt prop_add_list prop_type_add pum_getpos rand readfile reltimefloat remote_read repeat screenattr screenrow searchpair setbufline setcmdline setline setreg sha256 sign_getplaced sign_unplace slice sound_playfile sqrt str2nr strftime strpart strwidth swapname synstack tabpagewinnr tempname term_getansicolors term_getscrolled terminalprops term_setapi term_wait test_garbagecollect_soon test_null_blob test_null_list test_refcount test_void timer_stopall trunc uniq visualmode win_execute winheight win_move_separator winsaveview writefile
|
||||
syn keyword vimFuncName contained append asin assert_false assert_report autocmd_get browsedir bufname byteidxcomp charcol ch_evalexpr ch_logfile ch_sendraw complete cos deepcopy digraph_get environ exepath expr10 filter floor foldlevel function getbufvar getcharsearch getcmdtype getenv getimstatus getmousepos getreginfo gettagstack getwinvar haslocaldir hlexists indent inputrestore isabsolutepath job_getchannel join keytrans lispindent localtime mapcheck matchaddpos matchlist mkdir pathshorten popup_create popup_findpreview popup_menu popup_show prompt_setcallback prop_clear prop_type_change pumvisible range reduce reltimestr remote_send resolve screenchar screenstring searchpairpos setbufvar setcmdpos setloclist settabvar shellescape sign_jump sign_unplacelist sort sound_stop srand strcharlen strgetchar strptime submatch synconcealed system tagfiles term_dumpdiff term_getattr term_getsize term_list term_setkill test_alloc_fail test_getvalue test_null_channel test_null_partial test_setmouse timer_info tolower type utf16idx wildmenumode win_findbuf win_id2tabwin win_move_statusline win_screenpos xor
|
||||
syn keyword vimFuncName contained appendbufline assert_beeps assert_inrange assert_true balloon_gettext bufadd bufnr call charidx ch_evalraw ch_open ch_setoptions complete_add cosh delete digraph_getlist escape exists extend finddir fmod foldtext garbagecollect getcellwidths getcharstr getcmdwintype getfontname getjumplist getmouseshape getregtype gettext glob hasmapto hlget index inputsave isdirectory job_info js_decode len list2blob log maplist matcharg matchstr mode perleval popup_dialog popup_getoptions
|
||||
|
||||
"--- syntax here and above generated by mkvimvim ---
|
||||
" Special Vim Highlighting (not automatic) {{{1
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
" Vim syntax file
|
||||
" Language: X Pixmap
|
||||
" Maintainer: Ronald Schild <rs@scutum.de>
|
||||
" Last Change: 2021 Oct 04
|
||||
" Version: 5.4n.1
|
||||
" Last Change: 2023 May 11
|
||||
" Version: 5.4n.2
|
||||
" Jemma Nelson added termguicolors support
|
||||
" Dominique Pellé fixed spelling support
|
||||
" Christian J. Robinson fixed use of global variables, moved
|
||||
" loop into a compiled function
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -21,108 +23,119 @@ syn region xpmPixelString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@xpmCo
|
||||
|
||||
if has("gui_running") || has("termguicolors") && &termguicolors
|
||||
|
||||
let color = ""
|
||||
let chars = ""
|
||||
let colors = 0
|
||||
let cpp = 0
|
||||
let n = 0
|
||||
let i = 1
|
||||
def s:CreateSyntax(): void
|
||||
var color = ""
|
||||
var chars = ""
|
||||
var colors = 0
|
||||
var cpp = 0
|
||||
var n = 0
|
||||
var lines = getline(1, '$')
|
||||
|
||||
while i <= line("$") " scanning all lines
|
||||
for line in lines # scanning all lines
|
||||
|
||||
let s = matchstr(getline(i), '".\{-1,}"')
|
||||
if s != "" " does line contain a string?
|
||||
var s = matchstr(line, '".\{-1,}"')
|
||||
|
||||
if n == 0 " first string is the Values string
|
||||
if s != "" # does line contain a string?
|
||||
|
||||
" get the 3rd value: colors = number of colors
|
||||
let colors = substitute(s, '"\s*\d\+\s\+\d\+\s\+\(\d\+\).*"', '\1', '')
|
||||
" get the 4th value: cpp = number of character per pixel
|
||||
let cpp = substitute(s, '"\s*\d\+\s\+\d\+\s\+\d\+\s\+\(\d\+\).*"', '\1', '')
|
||||
if cpp =~ '[^0-9]'
|
||||
break " if cpp is not made of digits there must be something wrong
|
||||
endif
|
||||
if n == 0 # first string is the Values string
|
||||
|
||||
" Highlight the Values string as normal string (no pixel string).
|
||||
" Only when there is no slash, it would terminate the pattern.
|
||||
if s !~ '/'
|
||||
exe 'syn match xpmValues /' . s . '/'
|
||||
endif
|
||||
hi link xpmValues String
|
||||
var values = split(s[1 : -2])
|
||||
|
||||
let n = 1 " n = color index
|
||||
# Values string invalid, bail out
|
||||
if len(values) != 4
|
||||
return
|
||||
endif
|
||||
|
||||
elseif n <= colors " string is a color specification
|
||||
# get the 3rd value: colors = number of colors
|
||||
colors = str2nr(values[2])
|
||||
# get the 4th value: cpp = number of character per pixel
|
||||
cpp = str2nr(values[3])
|
||||
|
||||
" get chars = <cpp> length string representing the pixels
|
||||
" (first incl. the following whitespace)
|
||||
let chars = substitute(s, '"\(.\{'.cpp.'}\s\).*"', '\1', '')
|
||||
# these values must be positive, nonzero
|
||||
if colors < 1 || cpp < 1
|
||||
return
|
||||
endif
|
||||
|
||||
" now get color, first try 'c' key if any (color visual)
|
||||
let color = substitute(s, '".*\sc\s\+\(.\{-}\)\s*\(\(g4\=\|[ms]\)\s.*\)*\s*"', '\1', '')
|
||||
if color == s
|
||||
" no 'c' key, try 'g' key (grayscale with more than 4 levels)
|
||||
let color = substitute(s, '".*\sg\s\+\(.\{-}\)\s*\(\(g4\|[ms]\)\s.*\)*\s*"', '\1', '')
|
||||
# Highlight the Values string as normal string (no pixel string).
|
||||
# Only when there is no slash, it would terminate the pattern.
|
||||
if s !~ '/'
|
||||
exe 'syn match xpmValues /' .. s .. '/'
|
||||
endif
|
||||
hi link xpmValues String
|
||||
|
||||
n = 1 # n = color index
|
||||
|
||||
elseif n <= colors # string is a color specification
|
||||
|
||||
# get chars = <cpp> length string representing the pixels
|
||||
# (first incl. the following whitespace)
|
||||
chars = substitute(s, '"\(.\{' .. cpp .. '}\s\).*"', '\1', '')
|
||||
|
||||
# now get color, first try 'c' key if any (color visual)
|
||||
color = substitute(s, '".*\sc\s\+\(.\{-}\)\s*\(\(g4\=\|[ms]\)\s.*\)*\s*"', '\1', '')
|
||||
if color == s
|
||||
" next try: 'g4' key (4-level grayscale)
|
||||
let color = substitute(s, '".*\sg4\s\+\(.\{-}\)\s*\([ms]\s.*\)*\s*"', '\1', '')
|
||||
# no 'c' key, try 'g' key (grayscale with more than 4 levels)
|
||||
color = substitute(s, '".*\sg\s\+\(.\{-}\)\s*\(\(g4\|[ms]\)\s.*\)*\s*"', '\1', '')
|
||||
if color == s
|
||||
" finally try 'm' key (mono visual)
|
||||
let color = substitute(s, '".*\sm\s\+\(.\{-}\)\s*\(s\s.*\)*\s*"', '\1', '')
|
||||
# next try: 'g4' key (4-level grayscale)
|
||||
color = substitute(s, '".*\sg4\s\+\(.\{-}\)\s*\([ms]\s.*\)*\s*"', '\1', '')
|
||||
if color == s
|
||||
let color = ""
|
||||
# finally try 'm' key (mono visual)
|
||||
color = substitute(s, '".*\sm\s\+\(.\{-}\)\s*\(s\s.*\)*\s*"', '\1', '')
|
||||
if color == s
|
||||
color = ""
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Vim cannot handle RGB codes with more than 6 hex digits
|
||||
if color =~ '#\x\{10,}$'
|
||||
color = substitute(color, '\(\x\x\)\x\x', '\1', 'g')
|
||||
elseif color =~ '#\x\{7,}$'
|
||||
color = substitute(color, '\(\x\x\)\x', '\1', 'g')
|
||||
# nor with 3 digits
|
||||
elseif color =~ '#\x\{3}$'
|
||||
color = substitute(color, '\(\x\)\(\x\)\(\x\)', '0\10\20\3', '')
|
||||
endif
|
||||
|
||||
# escape meta characters in patterns
|
||||
s = escape(s, '/\*^$.~[] ')
|
||||
chars = escape(chars, '/\*^$.~[] ')
|
||||
|
||||
# now create syntax items
|
||||
# highlight the color string as normal string (no pixel string)
|
||||
exe 'syn match xpmCol' .. n .. 'Def /' .. s .. '/ contains=xpmCol' .. n .. 'inDef'
|
||||
exe 'hi link xpmCol' .. n .. 'Def String'
|
||||
|
||||
# but highlight the first whitespace after chars in its color
|
||||
exe 'syn match xpmCol' .. n .. 'inDef /"' .. chars .. '/hs=s+' .. (cpp + 1) .. ' contained'
|
||||
exe 'hi link xpmCol' .. n .. 'inDef xpmColor' .. n
|
||||
|
||||
# remove the following whitespace from chars
|
||||
chars = substitute(chars, '.$', '', '')
|
||||
|
||||
# and create the syntax item contained in the pixel strings
|
||||
exe 'syn match xpmColor' .. n .. ' /' .. chars .. '/ contained'
|
||||
exe 'syn cluster xpmColors add=xpmColor' .. n
|
||||
|
||||
# if no color or color = "None" show background
|
||||
if color == "" || substitute(color, '.*', '\L&', '') == 'none'
|
||||
exe 'hi xpmColor' .. n .. ' guifg=bg'
|
||||
exe 'hi xpmColor' .. n .. ' guibg=NONE'
|
||||
elseif color !~ "'"
|
||||
exe 'hi xpmColor' .. n .. " guifg='" .. color .. "'"
|
||||
exe 'hi xpmColor' .. n .. " guibg='" .. color .. "'"
|
||||
endif
|
||||
n += 1
|
||||
else
|
||||
break # no more color string
|
||||
endif
|
||||
|
||||
" Vim cannot handle RGB codes with more than 6 hex digits
|
||||
if color =~ '#\x\{10,}$'
|
||||
let color = substitute(color, '\(\x\x\)\x\x', '\1', 'g')
|
||||
elseif color =~ '#\x\{7,}$'
|
||||
let color = substitute(color, '\(\x\x\)\x', '\1', 'g')
|
||||
" nor with 3 digits
|
||||
elseif color =~ '#\x\{3}$'
|
||||
let color = substitute(color, '\(\x\)\(\x\)\(\x\)', '0\10\20\3', '')
|
||||
endif
|
||||
|
||||
" escape meta characters in patterns
|
||||
let s = escape(s, '/\*^$.~[]')
|
||||
let chars = escape(chars, '/\*^$.~[]')
|
||||
|
||||
" now create syntax items
|
||||
" highlight the color string as normal string (no pixel string)
|
||||
exe 'syn match xpmCol'.n.'Def /'.s.'/ contains=xpmCol'.n.'inDef'
|
||||
exe 'hi link xpmCol'.n.'Def String'
|
||||
|
||||
" but highlight the first whitespace after chars in its color
|
||||
exe 'syn match xpmCol'.n.'inDef /"'.chars.'/hs=s+'.(cpp+1).' contained'
|
||||
exe 'hi link xpmCol'.n.'inDef xpmColor'.n
|
||||
|
||||
" remove the following whitespace from chars
|
||||
let chars = substitute(chars, '.$', '', '')
|
||||
|
||||
" and create the syntax item contained in the pixel strings
|
||||
exe 'syn match xpmColor'.n.' /'.chars.'/ contained'
|
||||
exe 'syn cluster xpmColors add=xpmColor'.n
|
||||
|
||||
" if no color or color = "None" show background
|
||||
if color == "" || substitute(color, '.*', '\L&', '') == 'none'
|
||||
exe 'hi xpmColor'.n.' guifg=bg'
|
||||
exe 'hi xpmColor'.n.' guibg=NONE'
|
||||
elseif color !~ "'"
|
||||
exe 'hi xpmColor'.n." guifg='".color."'"
|
||||
exe 'hi xpmColor'.n." guibg='".color."'"
|
||||
endif
|
||||
let n = n + 1
|
||||
else
|
||||
break " no more color string
|
||||
endif
|
||||
endif
|
||||
let i = i + 1
|
||||
endwhile
|
||||
endfor
|
||||
enddef
|
||||
|
||||
unlet color chars colors cpp n i s
|
||||
call s:CreateSyntax()
|
||||
|
||||
endif " has("gui_running") || has("termguicolors") && &termguicolors
|
||||
|
||||
|
||||
Reference in New Issue
Block a user