diff --git a/.github/MAINTAINERS b/.github/MAINTAINERS index 9372e3310d..cd16c353a5 100644 --- a/.github/MAINTAINERS +++ b/.github/MAINTAINERS @@ -406,6 +406,7 @@ runtime/keymap/armenian-eastern_utf-8.vim @blinskey runtime/keymap/armenian-western_utf-8.vim @blinskey runtime/keymap/russian-typograph.vim @RestorerZ runtime/keymap/tamil_tscii.vim @yegappan +runtime/keymap/ukrainian-enhanced.vim @Dolfost runtime/lang/menu_en_gb.latin1.vim @mrdubya runtime/lang/menu_ru_ru.cp1251.vim @RestorerZ runtime/lang/menu_ru_ru.koi8-r.vim @RestorerZ diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index f2686c5397..9d00ab20e1 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -1,4 +1,4 @@ -*builtin.txt* For Vim version 9.1. Last change: 2025 Feb 06 +*builtin.txt* For Vim version 9.1. Last change: 2025 Feb 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -3008,7 +3008,8 @@ extend({expr1}, {expr2} [, {expr3}]) *extend()* When {expr3} is omitted then "force" is assumed. {expr1} is changed when {expr2} is not empty. If necessary - make a copy of {expr1} first. + make a copy of {expr1} first or use |extendnew()| to return a + new List/Dictionary. {expr2} remains unchanged. When {expr1} is locked and {expr2} is not empty the operation fails. diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index a5d245f50d..71ba061db3 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -1,4 +1,4 @@ -*insert.txt* For Vim version 9.1. Last change: 2024 Dec 31 +*insert.txt* For Vim version 9.1. Last change: 2025 Feb 14 VIM REFERENCE MANUAL by Bram Moolenaar @@ -657,6 +657,11 @@ CTRL-N (next), and CTRL-P (previous). To get the current completion information, |complete_info()| can be used. Also see the 'infercase' option if you want to adjust the case of the match. +When inserting a selected candidate word from the |popup-menu|, the part of +the candidate word that does not match the query is highlighted using +|hl-ComplMatchIns|. If fuzzy is enabled in 'completopt', highlighting will not +be applied. + *complete_CTRL-E* When completion is active you can use CTRL-E to stop it and go back to the originally typed text. The CTRL-E will not be inserted. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 42f1f29a8f..9acd2406f2 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 9.1. Last change: 2025 Feb 08 +*options.txt* For Vim version 9.1. Last change: 2025 Feb 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -8652,15 +8652,6 @@ A jump table for the options with a short description can be found at |Q_op|. When on, uses |highlight-guifg| and |highlight-guibg| attributes in the terminal (thus using 24-bit color). - Will automatically be enabled, if Vim detects that it runs in a - capable terminal (when the terminal supports the RGB terminfo - capability or when the number of colors |t_Co| supported by the - terminal is 0x1000000, e.g. with $TERM=xterm-direct). Due to the async - nature of querying the terminal, enabling this automatically is - noticable. Use > - set notermguicolors -< to explicitly disable. - Requires a ISO-8613-3 compatible terminal. If setting this option does not work (produces a colorless UI) reading |xterm-true-color| might help. diff --git a/runtime/doc/version9.txt b/runtime/doc/version9.txt index fbe9b9865c..de38d08e2e 100644 --- a/runtime/doc/version9.txt +++ b/runtime/doc/version9.txt @@ -41583,8 +41583,6 @@ Adjusted default values ~ increased to 12pt to accomodate modern high-dpi monitors - the default value of the 'keyprotocol' option has been updated and support for the ghostty terminal emulator (using kitty protocol) has been added -- 'termguicolors' is automatically enabled if the terminal supports the RGB - terminfo capability or supports 0x1000000 colors *changed-9.2* Changed~ diff --git a/runtime/doc/vim9class.txt b/runtime/doc/vim9class.txt index 5e5c28e9e3..7ba91e7d92 100644 --- a/runtime/doc/vim9class.txt +++ b/runtime/doc/vim9class.txt @@ -1,4 +1,4 @@ -*vim9class.txt* For Vim version 9.1. Last change: 2025 Feb 11 +*vim9class.txt* For Vim version 9.1. Last change: 2025 Feb 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -52,7 +52,6 @@ An interface is used to specify properties of an object: The class hierarchy allows for single inheritance. Otherwise interfaces are to be used where needed. - Class modeling ~ You can model classes any way you like. Keep in mind what you are building, @@ -122,7 +121,6 @@ using the object name followed by a dot following by the member: > A class name cannot be used as an expression. A class name cannot be used in the left-hand-side of an assignment. - Object variable write access ~ *read-only-variable* Now try to change an object variable directly: > @@ -626,13 +624,15 @@ once. They can appear in any order, although this order is recommended: > extends ClassName implements InterfaceName, OtherInterface specifies SomeInterface -< *E1355* *E1369* +< +The "specifies" feature is currently not implemented. + + *E1355* *E1369* Each variable and method name can be used only once. It is not possible to define a method with the same name and different type of arguments. It is not possible to use a public and protected member variable with the same name. An object variable name used in a super class cannot be reused in a child class. - Object Variable Initialization ~ If the type of a variable is not explicitly specified in a class, then it is @@ -689,13 +689,12 @@ A class can implement one or more interfaces. The "implements" keyword can only appear once *E1350* . Multiple interfaces can be specified, separated by commas. Each interface name can appear only once. *E1351* - A class defining an interface ~ *specifies* A class can declare its interface, the object variables and methods, with a named interface. This avoids the need for separately specifying the interface, which is often done in many languages, especially Java. - +TODO: This is currently not implemented. Items in a class ~ *E1318* *E1325* *E1388* @@ -736,25 +735,25 @@ Some of the builtin functions like |empty()|, |len()| and |string()| can be used with an object. An object can implement a method with the same name as these builtin functions to return an object-specific value. - *E1412* + *E1412* The following builtin methods are supported: - *object-empty()* + *object-empty()* empty() Invoked by the |empty()| function to check whether an object is empty. If this method is missing, then true is returned. This method should not accept any arguments and must return a boolean. - *object-len()* + *object-len()* len() Invoked by the |len()| function to return the length of an object. If this method is missing in the class, then an error is given and zero is returned. This method should not accept any arguments and must return a number. - *object-string()* + *object-string()* string() Invoked by the |string()| function to get a textual representation of an object. Also used by the |:echo| command for an object. If this method is missing in the class, then a built-in default textual representation is used. This method should not accept any arguments and must return a string. - *E1413* + *E1413* A class method cannot be used as a builtin method. Defining an interface ~ @@ -786,7 +785,6 @@ An interface can only be defined in a |Vim9| script file. *E1342* An interface cannot "implement" another interface but it can "extend" another interface. *E1381* - null object ~ When a variable is declared to have the type of an object, but it is not @@ -795,7 +793,6 @@ does not know what class was supposed to be used. Vim then cannot check if a variable name is correct and you will get a "Using a null object" error, even when the variable name is invalid. *E1360* *E1362* - Default constructor ~ *default-constructor* In case you define a class without a new() method, one will be automatically @@ -1118,7 +1115,6 @@ For |Vim9| script using the same method name for all constructors seemed like the right choice, and by calling it new() the relation between the caller and the method being called is obvious. - No overloading of the constructor ~ In Vim script, both legacy and |Vim9| script, there is no overloading of @@ -1139,7 +1135,6 @@ That way multiple constructors with different arguments are possible, while it is very easy to see which constructor is being used. And the type of arguments can be properly checked. - No overloading of methods ~ Same reasoning as for the constructor: It is often not obvious what type @@ -1148,7 +1143,6 @@ actually being called. Better just give the methods a different name, then type checking will make sure it works as you intended. This rules out polymorphism, which we don't really need anyway. - Single inheritance and interfaces ~ Some languages support multiple inheritance. Although that can be useful in @@ -1164,7 +1158,6 @@ it will be checked if that change was also changed. The mechanism to assume a class implements an interface just because the methods happen to match is brittle and leads to obscure problems, let's not do that. - Using "this.variable" everywhere ~ The object variables in various programming languages can often be accessed in @@ -1183,7 +1176,6 @@ variables. Simple and consistent. When looking at the code inside a class it's also directly clear which variable references are object variables and which aren't. - Using class variables ~ Using "static variable" to declare a class variable is very common, nothing @@ -1197,7 +1189,6 @@ the class. This has two problems: The class name can be rather long, taking up quite a bit of space, and when the class is renamed all these places need to be changed too. - Declaring object and class variables ~ The main choice is whether to use "var" as with variable declarations. @@ -1251,7 +1242,6 @@ function declaration syntax for class/object variables and methods. Vim9 also reuses the general function declaration syntax for methods. So, for the sake of consistency, we require "var" in these declarations. - Using "ClassName.new()" to construct an object ~ Many languages use the "new" operator to create an object, which is actually @@ -1315,7 +1305,6 @@ An alternative would have been using the "protected" keyword, just like "public" changes the access in the other direction. Well, that's just to reduce the number of keywords. - No private object variables ~ Some languages provide several ways to control access to object variables. diff --git a/runtime/keymap/ukrainian-enhanced.vim b/runtime/keymap/ukrainian-enhanced.vim new file mode 100644 index 0000000000..b71e33527e --- /dev/null +++ b/runtime/keymap/ukrainian-enhanced.vim @@ -0,0 +1,87 @@ +" Vim Keymap file for ukrainian characters MS Windows enhanced variant. +" This file is based on russian-jcukenwin.vim by Artem Chuprina . +" Keymap has been originally created by Ivan Korneliuk . + +" Maintainer: Vladyslav Rehan +" Last Changed: 2025 feb 13 + +scriptencoding utf-8 + +let b:keymap_name = "uk" + +loadkeymap +~ ’ RIGHT SINGLE QUOTATION MARK +` ' APOSTROPHE +F А CYRILLIC CAPITAL LETTER A +< Б CYRILLIC CAPITAL LETTER BE +D В CYRILLIC CAPITAL LETTER VE +U Г CYRILLIC CAPITAL LETTER GHE +| Ґ CYRILLIC CAPITAL LETTER GHE WITH UPTURN +L Д CYRILLIC CAPITAL LETTER DE +T Е CYRILLIC CAPITAL LETTER IE +: Ж CYRILLIC CAPITAL LETTER ZHE +P З CYRILLIC CAPITAL LETTER ZE +B И CYRILLIC CAPITAL LETTER I +S І CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I +} Ї CYRILLIC CAPITAL LETTER YI +Q Й CYRILLIC CAPITAL LETTER SHORT I +R К CYRILLIC CAPITAL LETTER KA +K Л CYRILLIC CAPITAL LETTER EL +V М CYRILLIC CAPITAL LETTER EM +Y Н CYRILLIC CAPITAL LETTER EN +J О CYRILLIC CAPITAL LETTER O +G П CYRILLIC CAPITAL LETTER PE +H Р CYRILLIC CAPITAL LETTER ER +C С CYRILLIC CAPITAL LETTER ES +N Т CYRILLIC CAPITAL LETTER TE +E У CYRILLIC CAPITAL LETTER U +A Ф CYRILLIC CAPITAL LETTER EF +{ Х CYRILLIC CAPITAL LETTER HA +W Ц CYRILLIC CAPITAL LETTER TSE +X Ч CYRILLIC CAPITAL LETTER CHE +I Ш CYRILLIC CAPITAL LETTER SHA +O Щ CYRILLIC CAPITAL LETTER SHCHA +M Ь CYRILLIC CAPITAL LETTER SOFT SIGN +\" Є CYRILLIC CAPITAL LETTER UKRAINIAN IE +> Ю CYRILLIC CAPITAL LETTER YU +Z Я CYRILLIC CAPITAL LETTER YA +f а CYRILLIC SMALL LETTER A +, б CYRILLIC SMALL LETTER BE +d в CYRILLIC SMALL LETTER VE +u г CYRILLIC SMALL LETTER GHE +\\ ґ CYRILLIC SMALL LETTER GHE WITH UPTURN +l д CYRILLIC SMALL LETTER DE +t е CYRILLIC SMALL LETTER IE +; ж CYRILLIC SMALL LETTER ZHE +p з CYRILLIC SMALL LETTER ZE +b и CYRILLIC SMALL LETTER I +s і CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I +] ї CYRILLIC SMALL LETTER YI +q й CYRILLIC SMALL LETTER SHORT I +r к CYRILLIC SMALL LETTER KA +k л CYRILLIC SMALL LETTER EL +v м CYRILLIC SMALL LETTER EM +y н CYRILLIC SMALL LETTER EN +j о CYRILLIC SMALL LETTER O +g п CYRILLIC SMALL LETTER PE +h р CYRILLIC SMALL LETTER ER +c с CYRILLIC SMALL LETTER ES +n т CYRILLIC SMALL LETTER TE +e у CYRILLIC SMALL LETTER U +a ф CYRILLIC SMALL LETTER EF +[ х CYRILLIC SMALL LETTER HA +w ц CYRILLIC SMALL LETTER TSE +x ч CYRILLIC SMALL LETTER CHE +i ш CYRILLIC SMALL LETTER SHA +o щ CYRILLIC SMALL LETTER SHCHA +m ь CYRILLIC SMALL LETTER SOFT SIGN +' є CYRILLIC SMALL LETTER UKRAINIAN IE +. ю CYRILLIC SMALL LETTER YU +z я CYRILLIC SMALL LETTER YA +@ " QUOTATION MARK +# № NUMERO SIGN +$ ; SEMICOLON +^ : COLON +& ? QUESTION MARK +/ . FULL STOP +? , COMMA diff --git a/runtime/pack/dist/opt/netrw/autoload/netrw.vim b/runtime/pack/dist/opt/netrw/autoload/netrw.vim index 243ff8738f..71310028fc 100644 --- a/runtime/pack/dist/opt/netrw/autoload/netrw.vim +++ b/runtime/pack/dist/opt/netrw/autoload/netrw.vim @@ -19,7 +19,7 @@ if &cp || exists("g:loaded_netrw") finish endif -let g:loaded_netrw = "v176" +let g:loaded_netrw = "v177" if !has("patch-9.1.1054") && !has('nvim') echoerr 'netrw needs Vim v9.1.1054' @@ -45,109 +45,104 @@ setl cpo&vim " netrw#ErrorMsg(s:NOTE | s:WARNING | s:ERROR,["message1","message2",...],error-number) " (this function can optionally take a list of messages) " Dec 2, 2019 : max errnum currently is 106 -fun! netrw#ErrorMsg(level,msg,errnum) - " call Dfunc("netrw#ErrorMsg(level=".a:level." msg<".a:msg."> errnum=".a:errnum.") g:netrw_use_errorwindow=".g:netrw_use_errorwindow) +function! netrw#ErrorMsg(level, msg, errnum) + if a:level < g:netrw_errorlvl + return + endif - if a:level < g:netrw_errorlvl - " call Dret("netrw#ErrorMsg : suppressing level=".a:level." since g:netrw_errorlvl=".g:netrw_errorlvl) - return - endif - - if a:level == 1 - let level= "**warning** (netrw) " - elseif a:level == 2 - let level= "**error** (netrw) " - else - let level= "**note** (netrw) " - endif - " call Decho("level=".level,'~'.expand("")) - - if g:netrw_use_errorwindow == 2 && exists("*popup_atcursor") - " use popup window - if type(a:msg) == 3 - let msg = [level]+a:msg + if a:level == 1 + let level = "**warning** (netrw) " + elseif a:level == 2 + let level = "**error** (netrw) " else - let msg= level.a:msg + let level = "**note** (netrw) " endif - let s:popuperr_id = popup_atcursor(msg,{}) - let s:popuperr_text= "" - elseif g:netrw_use_errorwindow - " (default) netrw creates a one-line window to show error/warning - " messages (reliably displayed) - " record current window number - let s:winBeforeErr= winnr() - " call Decho("s:winBeforeErr=".s:winBeforeErr,'~'.expand("")) + if g:netrw_use_errorwindow == 2 && exists("*popup_atcursor") + " use popup window + if type(a:msg) == 3 + let msg = [level]+a:msg + else + let msg = level.a:msg + endif + let s:popuperr_id = popup_atcursor(msg, {}) + let s:popuperr_text = "" + elseif has('nvim') + call v:lua.vim.notify(level . a:msg, a:level + 2) + elseif g:netrw_use_errorwindow + " (default) netrw creates a one-line window to show error/warning + " messages (reliably displayed) + + " record current window number + let s:winBeforeErr = winnr() + " call Decho("s:winBeforeErr=".s:winBeforeErr,'~'.expand("")) + + " getting messages out reliably is just plain difficult! + " This attempt splits the current window, creating a one line window. + if bufexists("NetrwMessage") && bufwinnr("NetrwMessage") > 0 + " call Decho("write to NetrwMessage buffer",'~'.expand("")) + exe bufwinnr("NetrwMessage")."wincmd w" + " call Decho("setl ma noro",'~'.expand("")) + setl ma noro + if type(a:msg) == 3 + for msg in a:msg + NetrwKeepj call setline(line("$")+1,level.msg) + endfor + else + NetrwKeepj call setline(line("$")+1,level.a:msg) + endif + NetrwKeepj $ + else + " call Decho("create a NetrwMessage buffer window",'~'.expand("")) + bo 1split + sil! call s:NetrwEnew() + sil! NetrwKeepj call s:NetrwOptionsSafe(1) + setl bt=nofile + NetrwKeepj file NetrwMessage + " call Decho("setl ma noro",'~'.expand("")) + setl ma noro + if type(a:msg) == 3 + for msg in a:msg + NetrwKeepj call setline(line("$")+1,level.msg) + endfor + else + NetrwKeepj call setline(line("$"),level.a:msg) + endif + NetrwKeepj $ + endif + " call Decho("wrote msg<".level.a:msg."> to NetrwMessage win#".winnr(),'~'.expand("")) + if &fo !~ '[ta]' + syn clear + syn match netrwMesgNote "^\*\*note\*\*" + syn match netrwMesgWarning "^\*\*warning\*\*" + syn match netrwMesgError "^\*\*error\*\*" + hi link netrwMesgWarning WarningMsg + hi link netrwMesgError Error + endif + " call Decho("setl noma ro bh=wipe",'~'.expand("")) + setl ro nomod noma bh=wipe - " getting messages out reliably is just plain difficult! - " This attempt splits the current window, creating a one line window. - if bufexists("NetrwMessage") && bufwinnr("NetrwMessage") > 0 - " call Decho("write to NetrwMessage buffer",'~'.expand("")) - exe bufwinnr("NetrwMessage")."wincmd w" - " call Decho("setl ma noro",'~'.expand("")) - setl ma noro - if type(a:msg) == 3 - for msg in a:msg - NetrwKeepj call setline(line("$")+1,level.msg) - endfor - else - NetrwKeepj call setline(line("$")+1,level.a:msg) - endif - NetrwKeepj $ else - " call Decho("create a NetrwMessage buffer window",'~'.expand("")) - bo 1split - sil! call s:NetrwEnew() - sil! NetrwKeepj call s:NetrwOptionsSafe(1) - setl bt=nofile - NetrwKeepj file NetrwMessage - " call Decho("setl ma noro",'~'.expand("")) - setl ma noro - if type(a:msg) == 3 - for msg in a:msg - NetrwKeepj call setline(line("$")+1,level.msg) - endfor - else - NetrwKeepj call setline(line("$"),level.a:msg) - endif - NetrwKeepj $ - endif - " call Decho("wrote msg<".level.a:msg."> to NetrwMessage win#".winnr(),'~'.expand("")) - if &fo !~ '[ta]' - syn clear - syn match netrwMesgNote "^\*\*note\*\*" - syn match netrwMesgWarning "^\*\*warning\*\*" - syn match netrwMesgError "^\*\*error\*\*" - hi link netrwMesgWarning WarningMsg - hi link netrwMesgError Error - endif - " call Decho("setl noma ro bh=wipe",'~'.expand("")) - setl ro nomod noma bh=wipe + " (optional) netrw will show messages using echomsg. Even if the + " message doesn't appear, at least it'll be recallable via :messages + " redraw! + if a:level == s:WARNING + echohl WarningMsg + elseif a:level == s:ERROR + echohl Error + endif - else - " (optional) netrw will show messages using echomsg. Even if the - " message doesn't appear, at least it'll be recallable via :messages - " redraw! - if a:level == s:WARNING - echohl WarningMsg - elseif a:level == s:ERROR - echohl Error + if type(a:msg) == 3 + for msg in a:msg + unsilent echomsg level.msg + endfor + else + unsilent echomsg level.a:msg + endif + + echohl None endif - - if type(a:msg) == 3 - for msg in a:msg - unsilent echomsg level.msg - endfor - else - unsilent echomsg level.a:msg - endif - - " call Decho("echomsg ***netrw*** ".a:msg,'~'.expand("")) - echohl None - endif - - " call Dret("netrw#ErrorMsg") -endfun +endfunction " --------------------------------------------------------------------- " s:NetrwInit: initializes variables if they haven't been defined {{{2 @@ -523,11 +518,9 @@ call s:NetrwInit("g:netrw_sort_by" , "name") " alternatives: date call s:NetrwInit("g:netrw_sort_options" , "") call s:NetrwInit("g:netrw_sort_direction", "normal") " alternative: reverse (z y x ...) if !exists("g:netrw_sort_sequence") - if has("unix") - let g:netrw_sort_sequence= '[\/]$,\,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\.obj$,\.info$,\.swp$,\.bak$,\~$' - else - let g:netrw_sort_sequence= '[\/]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,\.info$,\.swp$,\.bak$,\~$' - endif + let g:netrw_sort_sequence = !empty(&suffixes) + \ ? printf('[\/]$,*,\%(%s\)[*@]\=$', &suffixes->split(',')->map('escape(v:val, ".*$~")')->join('\|')) + \ : '[\/]$,*' endif call s:NetrwInit("g:netrw_special_syntax" , 0) call s:NetrwInit("g:netrw_ssh_browse_reject", '^total\s\+\d\+$') @@ -4893,7 +4886,7 @@ fun! s:NetrwBrowseUpDir(islocal) endfun " --------------------------------------------------------------------- -" netrw#BrowseX: (implements "x" and "gx") executes a special "viewer" script or program for the {{{2 +" netrw#BrowseX: (implements "x") executes a special "viewer" script or program for the {{{2 " given filename; typically this means given their extension. " 0=local, 1=remote fun! netrw#BrowseX(fname,remote) @@ -4995,17 +4988,6 @@ fun! netrw#BrowseX(fname,remote) let &aw= awkeep endfun -" --------------------------------------------------------------------- -" netrw#BrowseXVis: used by gx in visual mode to select a file for browsing {{{2 -fun! netrw#BrowseXVis() - let dict={} - let dict.a=[getreg('a'), getregtype('a')] - norm! gv"ay - let gxfile= @a - call s:RestoreRegister(dict) - call netrw#BrowseX(gxfile,netrw#CheckIfRemote(gxfile)) -endfun - " --------------------------------------------------------------------- " s:NetrwBufRename: renames a buffer without the side effect of retaining an unlisted buffer having the old name {{{2 " Using the file command on a "[No Name]" buffer does not seem to cause the old "[No Name]" buffer @@ -5315,30 +5297,32 @@ endfun " --------------------------------------------------------------------- " s:NetrwHome: this function determines a "home" for saving bookmarks and history {{{2 function! s:NetrwHome() - if has('nvim') - let home = netrw#own#JoinPath(stdpath('state'), 'netrw') - elseif exists("g:netrw_home") - let home = expand(g:netrw_home) - else - let home = expand("$MYVIMDIR")->substitute("/$", "", "") - endif - - " insure that the home directory exists - if g:netrw_dirhistmax > 0 && !isdirectory(s:NetrwFile(home)) - if exists("g:netrw_mkdir") - call system(g:netrw_mkdir." ".s:ShellEscape(s:NetrwFile(home))) + if has('nvim') + let home = netrw#own#PathJoin(stdpath('state'), 'netrw') + elseif exists('g:netrw_home') + let home = expand(g:netrw_home) + elseif exists('$MYVIMDIR') + let home = expand('$MYVIMDIR')->substitute('/$', '', '') else - call mkdir(home) + let home = netrw#own#PathJoin(expand('~'), '.vim') endif - endif - " Normalize directory if on Windows - if has("win32") - let home = substitute(home, '/', '\\', 'g') - endif + " insure that the home directory exists + if g:netrw_dirhistmax > 0 && !isdirectory(s:NetrwFile(home)) + if exists("g:netrw_mkdir") + call system(g:netrw_mkdir." ".s:ShellEscape(s:NetrwFile(home))) + else + call mkdir(home) + endif + endif - let g:netrw_home = home - return home + " Normalize directory if on Windows + if has("win32") + let home = substitute(home, '/', '\\', 'g') + endif + + let g:netrw_home = home + return home endfunction " --------------------------------------------------------------------- @@ -6350,7 +6334,7 @@ fun! s:NetrwMarkFileCopy(islocal,...) endif " copy marked files while within the same directory (ie. allow renaming) - if s:StripTrailingSlash(simplify(s:netrwmftgt)) == s:StripTrailingSlash(simplify(b:netrw_curdir)) + if simplify(s:netrwmftgt) ==# simplify(b:netrw_curdir) if len(s:netrwmarkfilelist_{bufnr('%')}) == 1 " only one marked file " call Decho("case: only one marked file",'~'.expand("")) @@ -10237,131 +10221,124 @@ endfun " --------------------------------------------------------------------- " s:NetrwLocalRm: {{{2 -fun! s:NetrwLocalRm(path) range - if !exists("w:netrw_bannercnt") - let w:netrw_bannercnt= b:netrw_bannercnt - endif +function! s:NetrwLocalRm(path) range + if !exists("w:netrw_bannercnt") + let w:netrw_bannercnt = b:netrw_bannercnt + endif - " preparation for removing multiple files/directories - let ykeep = @@ - let ret = 0 - let all = 0 - let svpos = winsaveview() + " preparation for removing multiple files/directories + let ykeep = @@ + let ret = 0 + let all = 0 + let svpos = winsaveview() - if exists("s:netrwmarkfilelist_{bufnr('%')}") - " remove all marked files - for fname in s:netrwmarkfilelist_{bufnr("%")} - let ok= s:NetrwLocalRmFile(a:path,fname,all) - if ok =~# 'q\%[uit]' || ok == "no" - break - elseif ok =~# '^a\%[ll]$' - let all= 1 - endif - endfor - call s:NetrwUnMarkFile(1) + if exists("s:netrwmarkfilelist_{bufnr('%')}") + " remove all marked files + for fname in s:netrwmarkfilelist_{bufnr("%")} + let ok = s:NetrwLocalRmFile(a:path, fname, all) + if ok =~# '^a\%[ll]$' + let all = 1 + elseif ok =~# "n\%[o]" + break + endif + endfor + call s:NetrwUnMarkFile(1) - else - " remove (multiple) files and directories + else + " remove (multiple) files and directories - let keepsol= &l:sol - setl nosol - let ctr = a:firstline - while ctr <= a:lastline - exe "NetrwKeepj ".ctr + let keepsol = &l:sol + setl nosol + let ctr = a:firstline + while ctr <= a:lastline + exe "NetrwKeepj ".ctr - " sanity checks - if line(".") < w:netrw_bannercnt - let ctr= ctr + 1 - continue - endif - let curword= s:NetrwGetWord() - if curword == "./" || curword == "../" - let ctr= ctr + 1 - continue - endif - let ok= s:NetrwLocalRmFile(a:path,curword,all) - if ok =~# 'q\%[uit]' || ok == "no" - break - elseif ok =~# '^a\%[ll]$' - let all= 1 - endif - let ctr= ctr + 1 - endwhile - let &l:sol= keepsol - endif + " sanity checks + if line(".") < w:netrw_bannercnt + let ctr = ctr + 1 + continue + endif - " refresh the directory - if bufname("%") != "NetrwMessage" - NetrwKeepj call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./',0)) - NetrwKeepj call winrestview(svpos) - endif - let @@= ykeep -endfun + let curword = s:NetrwGetWord() + if curword == "./" || curword == "../" + let ctr = ctr + 1 + continue + endif + + let ok = s:NetrwLocalRmFile(a:path, curword, all) + if ok =~# '^a\%[ll]$' + let all = 1 + elseif ok =~# "n\%[o]" + break + endif + + let ctr = ctr + 1 + endwhile + + let &l:sol = keepsol + endif + + " refresh the directory + if bufname("%") != "NetrwMessage" + NetrwKeepj call s:NetrwRefresh(1, s:NetrwBrowseChgDir(1, './', 0)) + NetrwKeepj call winrestview(svpos) + endif + + let @@= ykeep +endfunction " --------------------------------------------------------------------- " s:NetrwLocalRmFile: remove file fname given the path {{{2 " Give confirmation prompt unless all==1 -fun! s:NetrwLocalRmFile(path,fname,all) - " call Dfunc("s:NetrwLocalRmFile(path<".a:path."> fname<".a:fname."> all=".a:all) +function! s:NetrwLocalRmFile(path, fname, all) + let all = a:all + let ok = "" + let dir = 0 + NetrwKeepj norm! 0 + let rmfile = s:NetrwFile(s:ComposePath(a:path, escape(a:fname, '\\')))->fnamemodify(':.') - let all= a:all - let ok = "" - NetrwKeepj norm! 0 - let rmfile= s:NetrwFile(s:ComposePath(a:path,escape(a:fname, '\\'))) - " call Decho("rmfile<".rmfile.">",'~'.expand("")) + " if not a directory + if rmfile !~ '^"' && (rmfile =~ '@$' || rmfile !~ '[\/]$') + let msg = "Confirm deletion of file <%s> [{y(es)},n(o),a(ll)]: " + else + let msg = "Confirm *recursive* deletion of directory <%s> [{y(es)},n(o),a(ll)]: " + let dir = 1 + endif - if rmfile !~ '^"' && (rmfile =~ '@$' || rmfile !~ '[\/]$') - " attempt to remove file - " call Decho("attempt to remove file<".rmfile.">",'~'.expand("")) + " Ask confirmation if !all - echohl Statement - call inputsave() - let ok= input("Confirm deletion of file <".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") - call inputrestore() - echohl NONE - if ok == "" - let ok="no" - endif - " call Decho("response: ok<".ok.">",'~'.expand("")) - let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e') - " call Decho("response: ok<".ok."> (after sub)",'~'.expand("")) - if ok =~# '^a\%[ll]$' - let all= 1 - endif + echohl Statement + call inputsave() + let ok = input(printf(msg, rmfile)) + call inputrestore() + echohl NONE + if ok =~# '^a\%[ll]$' || ok =~# '^y\%[es]$' + let all = 1 + else + let ok = 'no' + endif endif - if all || ok =~# '^y\%[es]$' || ok == "" - let ret= s:NetrwDelete(rmfile) - " call Decho("errcode=".v:shell_error." ret=".ret,'~'.expand("")) + if !dir && (all || empty(ok)) + " This works because delete return 0 if successful + if s:NetrwDelete(rmfile) + call netrw#ErrorMsg(s:ERROR, printf("unable to delete <%s>!", rmfile), 103) + else + " Remove file only if there are no pending changes + execute printf('silent! bwipeout %s', rmfile) + endif + + elseif dir && (all || empty(ok)) + " Remove trailing / + let rmfile = substitute(rmfile, '[\/]$', '', 'e') + if delete(rmfile, "rf") + call netrw#ErrorMsg(s:ERROR, printf("unable to delete directory <%s>!", rmfile), 103) + endif + endif - else - " attempt to remove directory - if !all - echohl Statement - call inputsave() - let ok= input("Confirm *recursive* deletion of directory <".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") - call inputrestore() - let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e') - if ok == "" - let ok="no" - endif - if ok =~# '^a\%[ll]$' - let all= 1 - endif - endif - let rmfile= substitute(rmfile,'[\/]$','','e') - - if all || ok =~# '^y\%[es]$' || ok == "" - if delete(rmfile,"rf") - call netrw#ErrorMsg(s:ERROR,"unable to delete directory <".rmfile.">!",103) - endif - endif - endif - - " call Dret("s:NetrwLocalRmFile ".ok) - return ok -endfun + return ok +endfunction " ===================================================================== " Support Functions: {{{1 @@ -10483,13 +10460,6 @@ fun! netrw#WinPath(path) return path endfun -" --------------------------------------------------------------------- -" s:StripTrailingSlash: removes trailing slashes from a path {{{2 -fun! s:StripTrailingSlash(path) - " remove trailing slash - return substitute(a:path, '[/\\]$', '', 'g') -endfun - " --------------------------------------------------------------------- " s:NetrwBadd: adds marked files to buffer list or vice versa {{{2 " cb : bl2mf=0 add marked files to buffer list @@ -10611,9 +10581,9 @@ fun! s:FileReadable(fname) " call Dfunc("s:FileReadable(fname<".a:fname.">)") if g:netrw_cygwin - let ret= filereadable(s:NetrwFile(substitute(a:fname,g:netrw_cygdrive.'/\(.\)','\1:/',''))) + let ret = filereadable(s:NetrwFile(substitute(a:fname,g:netrw_cygdrive.'/\(.\)','\1:/',''))) else - let ret= filereadable(s:NetrwFile(a:fname)) + let ret = filereadable(s:NetrwFile(a:fname)) endif " call Dret("s:FileReadable ".ret) @@ -10872,31 +10842,24 @@ endfun " Uses Steve Hall's idea to insure that Windows paths stay " acceptable. No effect on Unix paths. " Examples of use: let result= s:NetrwDelete(path) -fun! s:NetrwDelete(path) - " call Dfunc("s:NetrwDelete(path<".a:path.">)") +function! s:NetrwDelete(path) + let path = netrw#WinPath(a:path) - let path = netrw#WinPath(a:path) - if !g:netrw_cygwin && has("win32") - if exists("+shellslash") - let sskeep= &shellslash - setl noshellslash - let result = delete(path) - let &shellslash = sskeep + if !g:netrw_cygwin && has("win32") && exists("+shellslash") + let sskeep = &shellslash + setl noshellslash + let result = delete(path) + let &shellslash = sskeep else - " call Decho("exe let result= ".a:cmd."('".path."')",'~'.expand("")) - let result= delete(path) + let result = delete(path) endif - else - " call Decho("let result= delete(".path.")",'~'.expand("")) - let result= delete(path) - endif - if result < 0 - NetrwKeepj call netrw#ErrorMsg(s:WARNING,"delete(".path.") failed!",71) - endif - " call Dret("s:NetrwDelete ".result) - return result -endfun + if result < 0 + NetrwKeepj call netrw#ErrorMsg(s:WARNING, "delete(".path.") failed!", 71) + endif + + return result +endfunction " --------------------------------------------------------------------- " s:NetrwBufRemover: removes a buffer that: {{{2s @@ -11650,7 +11613,7 @@ fun! s:UserMaps(islocal,funcname) endif endfun -" Deprecated: {{{ +" Deprecated: {{{1 function! netrw#Launch(args) call netrw#own#Deprecate('netrw#Launch', 'v180', {'vim': 'dist#vim9#Launch', 'nvim': 'vim.system'}) @@ -11665,14 +11628,11 @@ function! netrw#Open(file) endfunction " }}} -" ========================== " Settings Restoration: {{{1 " ========================== let &cpo= s:keepcpo unlet s:keepcpo -" =============== -" Modelines: {{{1 -" =============== +" }}} " vim:ts=8 sts=4 sw=4 et fdm=marker diff --git a/runtime/pack/dist/opt/netrw/autoload/netrw/own.vim b/runtime/pack/dist/opt/netrw/autoload/netrw/own.vim index 8f05b6a0ad..9fdf85a8f8 100644 --- a/runtime/pack/dist/opt/netrw/autoload/netrw/own.vim +++ b/runtime/pack/dist/opt/netrw/autoload/netrw/own.vim @@ -2,12 +2,14 @@ " THIS FUNCTIONS DON'T COMMIT TO ANY BACKWARDS COMPATABILITY. SO CHANGES AND " BREAKAGES IF USED OUTSIDE OF NETRW.VIM ARE EXPECTED. +" General: {{{ + let s:deprecation_msgs = [] function! netrw#own#Deprecate(name, version, alternatives) " If running on neovim use vim.deprecate if has('nvim') let s:alternative = a:alternatives->get('nvim', v:null) - call luaeval('vim.deprecate(unpack(_A)) and nil', [a:name, s:alternative, a:version, "netrw", v:false]) + call v:lua.vim.deprecate(a:name, s:alternative, a:version, "netrw", v:false) return endif @@ -27,8 +29,20 @@ function! netrw#own#Deprecate(name, version, alternatives) call add(s:deprecation_msgs, a:name) endfunction +function! netrw#own#Open(file) abort + if has('nvim') + call luaeval('vim.ui.open(_A[1]) and nil', [a:file]) + else + call dist#vim9#Open(a:file) + endif +endfunction + +" }}} +" Path Utilities: {{{ + let s:slash = &shellslash ? '/' : '\' -function! netrw#own#JoinPath(...) + +function! netrw#own#PathJoin(...) let path = "" for arg in a:000 @@ -42,12 +56,6 @@ function! netrw#own#JoinPath(...) return path endfunction -function! netrw#own#Open(file) abort - if has('nvim') - call luaeval('vim.ui.open(_A[1]) and nil', [a:file]) - else - call dist#vim9#Open(a:file) - endif -endfunction +" }}} " vim:ts=8 sts=4 sw=4 et fdm=marker diff --git a/runtime/pack/dist/opt/netrw/autoload/netrwSettings.vim b/runtime/pack/dist/opt/netrw/autoload/netrwSettings.vim index 2d1787f541..ba143ed808 100644 --- a/runtime/pack/dist/opt/netrw/autoload/netrwSettings.vim +++ b/runtime/pack/dist/opt/netrw/autoload/netrwSettings.vim @@ -15,7 +15,7 @@ if &cp || exists("g:loaded_netrwSettings") finish endif -let g:loaded_netrwSettings = "v176" +let g:loaded_netrwSettings = "v177" " NetrwSettings: {{{ diff --git a/runtime/pack/dist/opt/netrw/plugin/netrwPlugin.vim b/runtime/pack/dist/opt/netrw/plugin/netrwPlugin.vim index ec133d0a4b..76a91b44ce 100644 --- a/runtime/pack/dist/opt/netrw/plugin/netrwPlugin.vim +++ b/runtime/pack/dist/opt/netrw/plugin/netrwPlugin.vim @@ -15,7 +15,7 @@ if &cp || exists("g:loaded_netrwPlugin") finish endif -let g:loaded_netrwPlugin = "v176" +let g:loaded_netrwPlugin = "v177" let s:keepcpo = &cpo set cpo&vim diff --git a/runtime/syntax/generator/vim.vim.base b/runtime/syntax/generator/vim.vim.base index d2ddd1c90c..009b2083b9 100644 --- a/runtime/syntax/generator/vim.vim.base +++ b/runtime/syntax/generator/vim.vim.base @@ -2,7 +2,7 @@ " Language: Vim script " Maintainer: Hirohito Higashi " Doug Kearns -" Last Change: 2025 Feb 13 +" Last Change: 2025 Feb 16 " Former Maintainer: Charles E. Campbell " DO NOT CHANGE DIRECTLY. @@ -199,7 +199,6 @@ syn match vimNumber '\<0o\=\o\+' skipwhite nextgroup=vimGlobal,vimSubst1,@vimC syn match vimNumber '\<0x\x\+' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment,vimSubscript syn match vimNumber '\<0z\>' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment,vimSubscript -syn match vimNumber '\%(^\|\A\)\zs#\x\{6}' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment syn case match " All vimCommands are contained by vimIsCommand. {{{2 @@ -360,7 +359,7 @@ syn match vim9LambdaOperatorComment contained "#.*" skipwhite skipempty nextgrou syn cluster vimFuncList contains=vimFuncBang,vimFunctionError,vimFuncKey,vimFuncScope,vimFuncSID,Tag syn cluster vimDefList contains=vimFuncBang,vimFunctionError,vimDefKey,vimFuncScope,vimFuncSID,Tag -syn cluster vimFuncBodyCommon contains=@vimCmdList,vimCmplxRepeat,vimContinue,vimCtrlChar,vimDef,vimFBVar,vimFunc,vimFunction,vimLetHereDoc,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegister,vimSpecFile,vimString,vimSubst,vimFuncFold,vimDefFold +syn cluster vimFuncBodyCommon contains=@vimCmdList,vimCmplxRepeat,vimContinue,vimCtrlChar,vimDef,vimFBVar,vimFunc,vimFunction,vimLetHereDoc,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegister,vimSpecFile,vimString,vimSubst,vimFuncFold,vimDefFold syn cluster vimFuncBodyList contains=@vimFuncBodyCommon,vimComment,vimLineComment,vimInsert,vimConst,vimLet,vimSearch syn cluster vimDefBodyList contains=@vimFuncBodyCommon,vim9Comment,vim9LineComment,vim9Block,vim9Const,vim9Final,vim9Var,vim9Null,vim9Boolean,vim9For,vim9LhsVariable,vim9LhsVariableList,vim9LhsRegister,vim9Search,@vimSpecialVar @@ -630,7 +629,10 @@ syn match vimCommentError contained +".*+ syn match vimEnvvar "\$\I\i*" syn match vimEnvvar "\${\I\i*}" -" In-String Specials: {{{2 +" Strings {{{2 +" ======= + +" In-String Specials: " Try to catch strings, if nothing else matches (therefore it must precede the others!) " vimEscapeBrace handles ["] []"] (ie. "s don't terminate string inside []) syn region vimEscapeBrace oneline contained transparent start="[^\\]\(\\\\\)*\[\zs\^\=\]\=" skip="\\\\\|\\\]" end="]"me=e-1 @@ -643,8 +645,6 @@ syn cluster vimStringGroup contains=vimEscape,vimEscapeBrace,vimPatSep,vimNotPat syn region vimString oneline keepend matchgroup=vimString start=+[^a-zA-Z>\\@]"+lc=1 skip=+\\\\\|\\"+ matchgroup=vimStringEnd end=+"+ nextgroup=vimSubscript contains=@vimStringGroup extend syn region vimString oneline matchgroup=vimString start=+[^a-zA-Z>\\@]'+lc=1 end=+'+ nextgroup=vimSubscript contains=vimQuoteEscape extend "syn region vimString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=@vimStringGroup " see tst45.vim -syn match vimString contained +"[^"]*\\$+ skipnl nextgroup=vimStringCont -syn match vimStringCont contained +\(\\\\\|.\)\{-}[^\\]"+ syn match vimEscape contained "\\." " syn match vimEscape contained +\\[befnrt\"]+ @@ -685,9 +685,6 @@ syn match vimSubstFlags contained "[&cegiIlnpr#]\+" syn match vimSubstDelim contained "\\" syn match vimSubstPat contained "\\\ze[/?&]" contains=vimSubstDelim nextgroup=vimSubstRep4 -" 'String': {{{2 -syn match vimString "[^(,]'[^']\{-}\zs'" - " Marks, Registers, Addresses, Filters: {{{2 syn match vimMark "'[a-zA-Z0-9]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst1 syn match vimMark "'[[\]{}()<>]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst1 @@ -875,22 +872,22 @@ syn match vimMenutranslateComment +".*+ contained containedin=vimMenutranslate " Angle-Bracket Notation: (tnx to Michael Geddes) {{{2 " ====================== syn case ignore -syn match vimNotation "\%#=1\%(\\\|\)\=<\%([scamd]-\)\{0,4}x\=\%(f\d\{1,2}\|[^ \t:]\|space\|bar\|bslash\|nl\|newline\|lf\|linefeed\|cr\|retu\%[rn]\|enter\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|csi\|right\|paste\%(start\|end\)\|left\|help\|undo\|k\=insert\|ins\|mouse\|[kz]\=home\|[kz]\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\%(page\)\=\%(\|down\|up\|k\d\>\)\)>" contains=vimBracket +syn match vimNotation contained "\%#=1\%(\\\|\)\=<\%([scamd]-\)\{0,4}x\=\%(f\d\{1,2}\|[^ \t:]\|space\|bar\|bslash\|nl\|newline\|lf\|linefeed\|cr\|retu\%[rn]\|enter\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|csi\|right\|paste\%(start\|end\)\|left\|help\|undo\|k\=insert\|ins\|mouse\|[kz]\=home\|[kz]\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\%(page\)\=\%(\|down\|up\|k\d\>\)\)>" contains=vimBracket -syn match vimNotation "\%#=1\%(\\\|\)\=<\%([scamd2-4]-\)\{0,4}\%(net\|dec\|jsb\|pterm\|urxvt\|sgr\)mouse>" contains=vimBracket -syn match vimNotation "\%#=1\%(\\\|\)\=<\%([scamd2-4]-\)\{0,4}\%(left\|middle\|right\)\%(mouse\|drag\|release\)>" contains=vimBracket -syn match vimNotation "\%#=1\%(\\\|\)\=<\%([scamd2-4]-\)\{0,4}left\%(mouse\|release\)nm>" contains=vimBracket -syn match vimNotation "\%#=1\%(\\\|\)\=<\%([scamd2-4]-\)\{0,4}x[12]\%(mouse\|drag\|release\)>" contains=vimBracket -syn match vimNotation "\%#=1\%(\\\|\)\=<\%([scamd2-4]-\)\{0,4}sgrmouserelease>" contains=vimBracket -syn match vimNotation "\%#=1\%(\\\|\)\=<\%([scamd2-4]-\)\{0,4}mouse\%(up\|down\|move\)>" contains=vimBracket -syn match vimNotation "\%#=1\%(\\\|\)\=<\%([scamd2-4]-\)\{0,4}scrollwheel\%(up\|down\|right\|left\)>" contains=vimBracket +syn match vimNotation contained "\%#=1\%(\\\|\)\=<\%([scamd2-4]-\)\{0,4}\%(net\|dec\|jsb\|pterm\|urxvt\|sgr\)mouse>" contains=vimBracket +syn match vimNotation contained "\%#=1\%(\\\|\)\=<\%([scamd2-4]-\)\{0,4}\%(left\|middle\|right\)\%(mouse\|drag\|release\)>" contains=vimBracket +syn match vimNotation contained "\%#=1\%(\\\|\)\=<\%([scamd2-4]-\)\{0,4}left\%(mouse\|release\)nm>" contains=vimBracket +syn match vimNotation contained "\%#=1\%(\\\|\)\=<\%([scamd2-4]-\)\{0,4}x[12]\%(mouse\|drag\|release\)>" contains=vimBracket +syn match vimNotation contained "\%#=1\%(\\\|\)\=<\%([scamd2-4]-\)\{0,4}sgrmouserelease>" contains=vimBracket +syn match vimNotation contained "\%#=1\%(\\\|\)\=<\%([scamd2-4]-\)\{0,4}mouse\%(up\|down\|move\)>" contains=vimBracket +syn match vimNotation contained "\%#=1\%(\\\|\)\=<\%([scamd2-4]-\)\{0,4}scrollwheel\%(up\|down\|right\|left\)>" contains=vimBracket -syn match vimNotation "\%#=1\%(\\\|\)\=<\%(sid\|nop\|nul\|lt\|drop\)>" contains=vimBracket -syn match vimNotation "\%#=1\%(\\\|\)\=<\%(snr\|plug\|cursorhold\|ignore\|cmd\|scriptcmd\|focus\%(gained\|lost\)\)>" contains=vimBracket -syn match vimNotation '\%(\\\|\)\=[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket -syn match vimNotation '\%#=1\%(\\\|\)\=<\%(q-\)\=\%(line[12]\|count\|bang\|reg\|args\|mods\|f-args\|f-mods\|lt\)>' contains=vimBracket -syn match vimNotation "\%#=1\%(\\\|\)\=<\%([cas]file\|abuf\|amatch\|cexpr\|cword\|cWORD\|client\|stack\|script\|sf\=lnum\)>" contains=vimBracket -syn match vimNotation "\%#=1\%(\\\|\)\=<\%([scamd]-\)\{0,4}char-\%(\d\+\|0\o\+\|0x\x\+\)>" contains=vimBracket +syn match vimNotation contained "\%#=1\%(\\\|\)\=<\%(sid\|nop\|nul\|lt\|drop\)>" contains=vimBracket +syn match vimNotation contained "\%#=1\%(\\\|\)\=<\%(snr\|plug\|cursorhold\|ignore\|cmd\|scriptcmd\|focus\%(gained\|lost\)\)>" contains=vimBracket +syn match vimNotation contained '\%(\\\|\)\=[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket +syn match vimNotation contained '\%#=1\%(\\\|\)\=<\%(q-\)\=\%(line[12]\|count\|bang\|reg\|args\|mods\|f-args\|f-mods\|lt\)>' contains=vimBracket +syn match vimNotation contained "\%#=1\%(\\\|\)\=<\%([cas]file\|abuf\|amatch\|cexpr\|cword\|cWORD\|client\|stack\|script\|sf\=lnum\)>" contains=vimBracket +syn match vimNotation contained "\%#=1\%(\\\|\)\=<\%([scamd]-\)\{0,4}char-\%(\d\+\|0\o\+\|0x\x\+\)>" contains=vimBracket syn match vimBracket contained "[\\<>]" syn case match @@ -916,7 +913,7 @@ if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror") syn match vimBufnrWarn /\\|\\|\\|\" skipwhite nextgroup=@vimExprList,vimNotation +syn match vimNotFunc "\%#=1\<\%(if\|el\%[seif]\|retu\%[rn]\|while\)\>" skipwhite nextgroup=@vimExprList,vimNotation " Match: {{{2 " ===== diff --git a/runtime/syntax/testdir/dumps/vim_key_notation_00.dump b/runtime/syntax/testdir/dumps/vim_key_notation_00.dump index ed58e2fdec..ea37115957 100644 --- a/runtime/syntax/testdir/dumps/vim_key_notation_00.dump +++ b/runtime/syntax/testdir/dumps/vim_key_notation_00.dump @@ -1,20 +1,20 @@ >"+0#0000e05#ffffff0| |K|e|y| |n|o|t|a|t|i|o|n| +0#0000000&@60 @75 -|<+0#e000e06&|S|p|a|c|e|>| +0#0000000&@67 -|<+0#e000e06&|T|a|b|>| +0#0000000&@69 -|<+0#e000e06&|T|a|b|>| +0#0000000&@69 -|<+0#e000e06&|N|L|>| +0#0000000&@70 -|<+0#e000e06&|N|e|w|L|i|n|e|>| +0#0000000&@65 -|<+0#e000e06&|L|i|n|e|F|e@1|d|>| +0#0000000&@64 -|<+0#e000e06&|L|F|>| +0#0000000&@70 -|<+0#e000e06&|C|R|>| +0#0000000&@70 -|<+0#e000e06&|R|e|t|u|r|n|>| +0#0000000&@66 -|<+0#e000e06&|E|n|t|e|r|>| +0#0000000&@67 -|<+0#e000e06&|B|S|>| +0#0000000&@70 -|<+0#e000e06&|B|a|c|k|S|p|a|c|e|>| +0#0000000&@63 -|<+0#e000e06&|E|s|c|>| +0#0000000&@69 -|<+0#e000e06&|C|S|I|>| +0#0000000&@69 -|<+0#e000e06&|x|C|S|I|>| +0#0000000&@68 -|<+0#e000e06&|B|a|r|>| +0#0000000&@69 -|<+0#e000e06&|B|s|l|a|s|h|>| +0#0000000&@66 +|m+0#af5f00255&|a|p| +0#0000000&|f|o@1| @67 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|S|p|a|c|e|>| +0#0000000&@59 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|T|a|b|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|T|a|b|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|N|L|>| +0#0000000&@62 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|N|e|w|L|i|n|e|>| +0#0000000&@57 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|L|i|n|e|F|e@1|d|>| +0#0000000&@56 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|L|F|>| +0#0000000&@62 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|C|R|>| +0#0000000&@62 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|R|e|t|u|r|n|>| +0#0000000&@58 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|E|n|t|e|r|>| +0#0000000&@59 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|B|S|>| +0#0000000&@62 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|B|a|c|k|S|p|a|c|e|>| +0#0000000&@55 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|E|s|c|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|C|S|I|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|x|C|S|I|>| +0#0000000&@60 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|B|a|r|>| +0#0000000&@61 @57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/vim_key_notation_01.dump b/runtime/syntax/testdir/dumps/vim_key_notation_01.dump index 0cbf0ee0fb..b14d575da9 100644 --- a/runtime/syntax/testdir/dumps/vim_key_notation_01.dump +++ b/runtime/syntax/testdir/dumps/vim_key_notation_01.dump @@ -1,20 +1,20 @@ -|<+0#e000e06#ffffff0|B|a|c|k|S|p|a|c|e|>| +0#0000000&@63 -|<+0#e000e06&|E|s|c|>| +0#0000000&@69 -|<+0#e000e06&|C|S|I|>| +0#0000000&@69 -|<+0#e000e06&|x|C|S|I|>| +0#0000000&@68 -|<+0#e000e06&|B|a|r|>| +0#0000000&@69 -><+0#e000e06&|B|s|l|a|s|h|>| +0#0000000&@66 -|<+0#e000e06&|D|e|l|>| +0#0000000&@69 -|<+0#e000e06&|D|e|l|e|t|e|>| +0#0000000&@66 -|<+0#e000e06&|k|D|e|l|>| +0#0000000&@68 -|<+0#e000e06&|U|p|>| +0#0000000&@70 -|<+0#e000e06&|D|o|w|n|>| +0#0000000&@68 -|<+0#e000e06&|L|e|f|t|>| +0#0000000&@68 -|<+0#e000e06&|R|i|g|h|t|>| +0#0000000&@67 -|<+0#e000e06&|x|U|p|>| +0#0000000&@69 -|<+0#e000e06&|x|D|o|w|n|>| +0#0000000&@67 -|<+0#e000e06&|x|L|e|f|t|>| +0#0000000&@67 -|<+0#e000e06&|x|R|i|g|h|t|>| +0#0000000&@66 -|<+0#e000e06&|P|a|s|t|e|S|t|a|r|t|>| +0#0000000&@62 -|<+0#e000e06&|P|a|s|t|e|E|n|d|>| +0#0000000&@64 -@57|1|9|,|1| @10|9|%| +| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|<+0#e000e06&|B|S|>| +0#0000000&@62 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|B|a|c|k|S|p|a|c|e|>| +0#0000000&@55 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|E|s|c|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|C|S|I|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|x|C|S|I|>| +0#0000000&@60 +@6>\+0#e000e06&| +0#0000000&|<+0#e000e06&|B|a|r|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|B|s|l|a|s|h|>| +0#0000000&@58 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|D|e|l|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|D|e|l|e|t|e|>| +0#0000000&@58 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|D|e|l|>| +0#0000000&@60 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|U|p|>| +0#0000000&@62 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|D|o|w|n|>| +0#0000000&@60 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|L|e|f|t|>| +0#0000000&@60 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|R|i|g|h|t|>| +0#0000000&@59 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|x|U|p|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|x|D|o|w|n|>| +0#0000000&@59 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|x|L|e|f|t|>| +0#0000000&@59 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|x|R|i|g|h|t|>| +0#0000000&@58 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|P|a|s|t|e|S|t|a|r|t|>| +0#0000000&@54 +@57|1|9|,|7| @10|8|%| diff --git a/runtime/syntax/testdir/dumps/vim_key_notation_02.dump b/runtime/syntax/testdir/dumps/vim_key_notation_02.dump index 01fca78c45..5826a4eccb 100644 --- a/runtime/syntax/testdir/dumps/vim_key_notation_02.dump +++ b/runtime/syntax/testdir/dumps/vim_key_notation_02.dump @@ -1,20 +1,20 @@ -|<+0#e000e06#ffffff0|P|a|s|t|e|E|n|d|>| +0#0000000&@64 -|<+0#e000e06&|F|1|>| +0#0000000&@70 -|<+0#e000e06&|F|2|>| +0#0000000&@70 -|<+0#e000e06&|F|3|>| +0#0000000&@70 -|<+0#e000e06&|F|4|>| +0#0000000&@70 -><+0#e000e06&|F|5|>| +0#0000000&@70 -|<+0#e000e06&|F|6|>| +0#0000000&@70 -|<+0#e000e06&|F|7|>| +0#0000000&@70 -|<+0#e000e06&|F|8|>| +0#0000000&@70 -|<+0#e000e06&|F|9|>| +0#0000000&@70 -|<+0#e000e06&|F|1|0|>| +0#0000000&@69 -|<+0#e000e06&|F|1@1|>| +0#0000000&@69 -|<+0#e000e06&|F|1|2|>| +0#0000000&@69 -|<+0#e000e06&|F|1|3|>| +0#0000000&@69 -|<+0#e000e06&|F|1|4|>| +0#0000000&@69 -|<+0#e000e06&|F|1|5|>| +0#0000000&@69 -|<+0#e000e06&|F|1|6|>| +0#0000000&@69 -|<+0#e000e06&|F|1|7|>| +0#0000000&@69 -|<+0#e000e06&|F|1|8|>| +0#0000000&@69 -@57|3|7|,|1| @9|2|1|%| +| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|<+0#e000e06&|P|a|s|t|e|S|t|a|r|t|>| +0#0000000&@54 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|P|a|s|t|e|E|n|d|>| +0#0000000&@56 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|1|>| +0#0000000&@62 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|2|>| +0#0000000&@62 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|3|>| +0#0000000&@62 +@6>\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|4|>| +0#0000000&@62 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|5|>| +0#0000000&@62 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|6|>| +0#0000000&@62 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|7|>| +0#0000000&@62 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|8|>| +0#0000000&@62 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|9|>| +0#0000000&@62 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|1|0|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|1@1|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|1|2|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|1|3|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|1|4|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|1|5|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|1|6|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|1|7|>| +0#0000000&@61 +@57|3|7|,|7| @9|2|1|%| diff --git a/runtime/syntax/testdir/dumps/vim_key_notation_03.dump b/runtime/syntax/testdir/dumps/vim_key_notation_03.dump index dfdf8902fa..ccb9f026d8 100644 --- a/runtime/syntax/testdir/dumps/vim_key_notation_03.dump +++ b/runtime/syntax/testdir/dumps/vim_key_notation_03.dump @@ -1,20 +1,20 @@ -|<+0#e000e06#ffffff0|F|1|8|>| +0#0000000&@69 -|<+0#e000e06&|F|1|9|>| +0#0000000&@69 -|<+0#e000e06&|F|2|0|>| +0#0000000&@69 -|<+0#e000e06&|F|2|1|>| +0#0000000&@69 -|<+0#e000e06&|F|2@1|>| +0#0000000&@69 -><+0#e000e06&|F|2|3|>| +0#0000000&@69 -|<+0#e000e06&|F|2|4|>| +0#0000000&@69 -|<+0#e000e06&|F|2|5|>| +0#0000000&@69 -|<+0#e000e06&|F|2|6|>| +0#0000000&@69 -|<+0#e000e06&|F|2|7|>| +0#0000000&@69 -|<+0#e000e06&|F|2|8|>| +0#0000000&@69 -|<+0#e000e06&|F|2|9|>| +0#0000000&@69 -|<+0#e000e06&|F|3|0|>| +0#0000000&@69 -|<+0#e000e06&|F|3|1|>| +0#0000000&@69 -|<+0#e000e06&|F|3|2|>| +0#0000000&@69 -|<+0#e000e06&|F|3@1|>| +0#0000000&@69 -|<+0#e000e06&|F|3|4|>| +0#0000000&@69 -|<+0#e000e06&|F|3|5|>| +0#0000000&@69 -|<+0#e000e06&|F|3|6|>| +0#0000000&@69 -@57|5@1|,|1| @9|3|4|%| +| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|1|7|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|1|8|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|1|9|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|2|0|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|2|1|>| +0#0000000&@61 +@6>\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|2@1|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|2|3|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|2|4|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|2|5|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|2|6|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|2|7|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|2|8|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|2|9|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|3|0|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|3|1|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|3|2|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|3@1|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|3|4|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|3|5|>| +0#0000000&@61 +@57|5@1|,|7| @9|3@1|%| diff --git a/runtime/syntax/testdir/dumps/vim_key_notation_04.dump b/runtime/syntax/testdir/dumps/vim_key_notation_04.dump index 8820c26806..d346187521 100644 --- a/runtime/syntax/testdir/dumps/vim_key_notation_04.dump +++ b/runtime/syntax/testdir/dumps/vim_key_notation_04.dump @@ -1,20 +1,20 @@ -|<+0#e000e06#ffffff0|F|3|6|>| +0#0000000&@69 -|<+0#e000e06&|F|3|7|>| +0#0000000&@69 -|<+0#e000e06&|x|F|1|>| +0#0000000&@69 -|<+0#e000e06&|x|F|2|>| +0#0000000&@69 -|<+0#e000e06&|x|F|3|>| +0#0000000&@69 -><+0#e000e06&|x|F|4|>| +0#0000000&@69 -|<+0#e000e06&|H|e|l|p|>| +0#0000000&@68 -|<+0#e000e06&|U|n|d|o|>| +0#0000000&@68 -|<+0#e000e06&|I|n|s|e|r|t|>| +0#0000000&@66 -|<+0#e000e06&|I|n|s|>| +0#0000000&@69 -|<+0#e000e06&|k|I|n|s|e|r|t|>| +0#0000000&@65 -|<+0#e000e06&|H|o|m|e|>| +0#0000000&@68 -|<+0#e000e06&|k|H|o|m|e|>| +0#0000000&@67 -|<+0#e000e06&|x|H|o|m|e|>| +0#0000000&@67 -|<+0#e000e06&|z|H|o|m|e|>| +0#0000000&@67 -|<+0#e000e06&|E|n|d|>| +0#0000000&@69 -|<+0#e000e06&|k|E|n|d|>| +0#0000000&@68 -|<+0#e000e06&|x|E|n|d|>| +0#0000000&@68 -|<+0#e000e06&|z|E|n|d|>| +0#0000000&@68 -@57|7|3|,|1| @9|4|6|%| +| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|3|5|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|3|6|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|3|7|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|x|F|1|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|x|F|2|>| +0#0000000&@61 +@6>\+0#e000e06&| +0#0000000&|<+0#e000e06&|x|F|3|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|x|F|4|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|H|e|l|p|>| +0#0000000&@60 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|U|n|d|o|>| +0#0000000&@60 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|I|n|s|e|r|t|>| +0#0000000&@58 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|I|n|s|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|I|n|s|e|r|t|>| +0#0000000&@57 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|H|o|m|e|>| +0#0000000&@60 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|H|o|m|e|>| +0#0000000&@59 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|x|H|o|m|e|>| +0#0000000&@59 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|z|H|o|m|e|>| +0#0000000&@59 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|E|n|d|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|E|n|d|>| +0#0000000&@60 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|x|E|n|d|>| +0#0000000&@60 +@57|7|3|,|7| @9|4|5|%| diff --git a/runtime/syntax/testdir/dumps/vim_key_notation_05.dump b/runtime/syntax/testdir/dumps/vim_key_notation_05.dump index 939bf89ba8..2962483d0a 100644 --- a/runtime/syntax/testdir/dumps/vim_key_notation_05.dump +++ b/runtime/syntax/testdir/dumps/vim_key_notation_05.dump @@ -1,20 +1,20 @@ -|<+0#e000e06#ffffff0|z|E|n|d|>| +0#0000000&@68 -|<+0#e000e06&|P|a|g|e|U|p|>| +0#0000000&@66 -|<+0#e000e06&|P|a|g|e|D|o|w|n|>| +0#0000000&@64 -|<+0#e000e06&|k|P|a|g|e|U|p|>| +0#0000000&@65 -|<+0#e000e06&|k|P|a|g|e|D|o|w|n|>| +0#0000000&@63 -><+0#e000e06&|k|P|l|u|s|>| +0#0000000&@67 -|<+0#e000e06&|k|M|i|n|u|s|>| +0#0000000&@66 -|<+0#e000e06&|k|D|i|v|i|d|e|>| +0#0000000&@65 -|<+0#e000e06&|k|M|u|l|t|i|p|l|y|>| +0#0000000&@63 -|<+0#e000e06&|k|E|n|t|e|r|>| +0#0000000&@66 -|<+0#e000e06&|k|P|o|i|n|t|>| +0#0000000&@66 -|<+0#e000e06&|k|0|>| +0#0000000&@70 -|<+0#e000e06&|k|1|>| +0#0000000&@70 -|<+0#e000e06&|k|2|>| +0#0000000&@70 -|<+0#e000e06&|k|3|>| +0#0000000&@70 -|<+0#e000e06&|k|4|>| +0#0000000&@70 -|<+0#e000e06&|k|5|>| +0#0000000&@70 -|<+0#e000e06&|k|6|>| +0#0000000&@70 -|<+0#e000e06&|k|7|>| +0#0000000&@70 -@57|9|1|,|1| @9|5|9|%| +| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|<+0#e000e06&|x|E|n|d|>| +0#0000000&@60 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|z|E|n|d|>| +0#0000000&@60 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|P|a|g|e|U|p|>| +0#0000000&@58 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|P|a|g|e|D|o|w|n|>| +0#0000000&@56 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|P|a|g|e|U|p|>| +0#0000000&@57 +@6>\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|P|a|g|e|D|o|w|n|>| +0#0000000&@55 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|P|l|u|s|>| +0#0000000&@59 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|M|i|n|u|s|>| +0#0000000&@58 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|D|i|v|i|d|e|>| +0#0000000&@57 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|M|u|l|t|i|p|l|y|>| +0#0000000&@55 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|E|n|t|e|r|>| +0#0000000&@58 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|P|o|i|n|t|>| +0#0000000&@58 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|0|>| +0#0000000&@62 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|1|>| +0#0000000&@62 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|2|>| +0#0000000&@62 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|3|>| +0#0000000&@62 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|4|>| +0#0000000&@62 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|5|>| +0#0000000&@62 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|6|>| +0#0000000&@62 +@57|9|1|,|7| @9|5|8|%| diff --git a/runtime/syntax/testdir/dumps/vim_key_notation_06.dump b/runtime/syntax/testdir/dumps/vim_key_notation_06.dump index e82c7f3ebb..66a80f213e 100644 --- a/runtime/syntax/testdir/dumps/vim_key_notation_06.dump +++ b/runtime/syntax/testdir/dumps/vim_key_notation_06.dump @@ -1,20 +1,20 @@ -|<+0#e000e06#ffffff0|k|7|>| +0#0000000&@70 -|<+0#e000e06&|k|8|>| +0#0000000&@70 -|<+0#e000e06&|k|9|>| +0#0000000&@70 -|<+0#e000e06&|l|t|>| +0#0000000&@70 -|<+0#e000e06&|M|o|u|s|e|>| +0#0000000&@67 -><+0#e000e06&|N|e|t|M|o|u|s|e|>| +0#0000000&@64 -|<+0#e000e06&|D|e|c|M|o|u|s|e|>| +0#0000000&@64 -|<+0#e000e06&|J|s|b|M|o|u|s|e|>| +0#0000000&@64 -|<+0#e000e06&|P|t|e|r|m|M|o|u|s|e|>| +0#0000000&@62 -|<+0#e000e06&|U|r|x|v|t|M|o|u|s|e|>| +0#0000000&@62 -|<+0#e000e06&|S|g|r|M|o|u|s|e|>| +0#0000000&@64 -|<+0#e000e06&|S|g|r|M|o|u|s|e|R|e|l|e|a|s|e|>| +0#0000000&@57 -|<+0#e000e06&|L|e|f|t|M|o|u|s|e|>| +0#0000000&@63 -|<+0#e000e06&|L|e|f|t|M|o|u|s|e|N|M|>| +0#0000000&@61 -|<+0#e000e06&|L|e|f|t|D|r|a|g|>| +0#0000000&@64 -|<+0#e000e06&|L|e|f|t|R|e|l|e|a|s|e|>| +0#0000000&@61 -|<+0#e000e06&|L|e|f|t|R|e|l|e|a|s|e|N|M|>| +0#0000000&@59 -|<+0#e000e06&|M|o|u|s|e|M|o|v|e|>| +0#0000000&@63 -|<+0#e000e06&|M|i|d@1|l|e|M|o|u|s|e|>| +0#0000000&@61 -@57|1|0|9|,|1| @8|7|1|%| +| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|6|>| +0#0000000&@62 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|7|>| +0#0000000&@62 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|8|>| +0#0000000&@62 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|9|>| +0#0000000&@62 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|l|t|>| +0#0000000&@62 +@6>\+0#e000e06&| +0#0000000&|<+0#e000e06&|M|o|u|s|e|>| +0#0000000&@59 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|N|e|t|M|o|u|s|e|>| +0#0000000&@56 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|D|e|c|M|o|u|s|e|>| +0#0000000&@56 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|J|s|b|M|o|u|s|e|>| +0#0000000&@56 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|P|t|e|r|m|M|o|u|s|e|>| +0#0000000&@54 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|U|r|x|v|t|M|o|u|s|e|>| +0#0000000&@54 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|S|g|r|M|o|u|s|e|>| +0#0000000&@56 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|S|g|r|M|o|u|s|e|R|e|l|e|a|s|e|>| +0#0000000&@49 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|L|e|f|t|M|o|u|s|e|>| +0#0000000&@55 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|L|e|f|t|M|o|u|s|e|N|M|>| +0#0000000&@53 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|L|e|f|t|D|r|a|g|>| +0#0000000&@56 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|L|e|f|t|R|e|l|e|a|s|e|>| +0#0000000&@53 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|L|e|f|t|R|e|l|e|a|s|e|N|M|>| +0#0000000&@51 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|M|o|u|s|e|M|o|v|e|>| +0#0000000&@55 +@57|1|0|9|,|7| @8|7|0|%| diff --git a/runtime/syntax/testdir/dumps/vim_key_notation_07.dump b/runtime/syntax/testdir/dumps/vim_key_notation_07.dump index 3e21774e1e..a05017e018 100644 --- a/runtime/syntax/testdir/dumps/vim_key_notation_07.dump +++ b/runtime/syntax/testdir/dumps/vim_key_notation_07.dump @@ -1,20 +1,20 @@ -|<+0#e000e06#ffffff0|M|i|d@1|l|e|M|o|u|s|e|>| +0#0000000&@61 -|<+0#e000e06&|M|i|d@1|l|e|D|r|a|g|>| +0#0000000&@62 -|<+0#e000e06&|M|i|d@1|l|e|R|e|l|e|a|s|e|>| +0#0000000&@59 -|<+0#e000e06&|R|i|g|h|t|M|o|u|s|e|>| +0#0000000&@62 -|<+0#e000e06&|R|i|g|h|t|D|r|a|g|>| +0#0000000&@63 -><+0#e000e06&|R|i|g|h|t|R|e|l|e|a|s|e|>| +0#0000000&@60 -|<+0#e000e06&|S|c|r|o|l@1|W|h|e@1|l|U|p|>| +0#0000000&@59 -|<+0#e000e06&|S|c|r|o|l@1|W|h|e@1|l|D|o|w|n|>| +0#0000000&@57 -|<+0#e000e06&|S|c|r|o|l@1|W|h|e@1|l|R|i|g|h|t|>| +0#0000000&@56 -|<+0#e000e06&|S|c|r|o|l@1|W|h|e@1|l|L|e|f|t|>| +0#0000000&@57 -|<+0#e000e06&|M|o|u|s|e|D|o|w|n|>| +0#0000000&@63 -|<+0#e000e06&|M|o|u|s|e|U|p|>| +0#0000000&@65 -|<+0#e000e06&|X|1|M|o|u|s|e|>| +0#0000000&@65 -|<+0#e000e06&|X|1|D|r|a|g|>| +0#0000000&@66 -|<+0#e000e06&|X|1|R|e|l|e|a|s|e|>| +0#0000000&@63 -|<+0#e000e06&|X|2|M|o|u|s|e|>| +0#0000000&@65 -|<+0#e000e06&|X|2|D|r|a|g|>| +0#0000000&@66 -|<+0#e000e06&|X|2|R|e|l|e|a|s|e|>| +0#0000000&@63 -|<+0#e000e06&|D|r|o|p|>| +0#0000000&@68 -@57|1|2|7|,|1| @8|8|4|%| +| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|<+0#e000e06&|M|o|u|s|e|M|o|v|e|>| +0#0000000&@55 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|M|i|d@1|l|e|M|o|u|s|e|>| +0#0000000&@53 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|M|i|d@1|l|e|D|r|a|g|>| +0#0000000&@54 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|M|i|d@1|l|e|R|e|l|e|a|s|e|>| +0#0000000&@51 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|R|i|g|h|t|M|o|u|s|e|>| +0#0000000&@54 +@6>\+0#e000e06&| +0#0000000&|<+0#e000e06&|R|i|g|h|t|D|r|a|g|>| +0#0000000&@55 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|R|i|g|h|t|R|e|l|e|a|s|e|>| +0#0000000&@52 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|S|c|r|o|l@1|W|h|e@1|l|U|p|>| +0#0000000&@51 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|S|c|r|o|l@1|W|h|e@1|l|D|o|w|n|>| +0#0000000&@49 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|S|c|r|o|l@1|W|h|e@1|l|R|i|g|h|t|>| +0#0000000&@48 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|S|c|r|o|l@1|W|h|e@1|l|L|e|f|t|>| +0#0000000&@49 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|M|o|u|s|e|D|o|w|n|>| +0#0000000&@55 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|M|o|u|s|e|U|p|>| +0#0000000&@57 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|X|1|M|o|u|s|e|>| +0#0000000&@57 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|X|1|D|r|a|g|>| +0#0000000&@58 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|X|1|R|e|l|e|a|s|e|>| +0#0000000&@55 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|X|2|M|o|u|s|e|>| +0#0000000&@57 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|X|2|D|r|a|g|>| +0#0000000&@58 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|X|2|R|e|l|e|a|s|e|>| +0#0000000&@55 +@57|1|2|7|,|7| @8|8|2|%| diff --git a/runtime/syntax/testdir/dumps/vim_key_notation_08.dump b/runtime/syntax/testdir/dumps/vim_key_notation_08.dump index 7337575273..37db049f7d 100644 --- a/runtime/syntax/testdir/dumps/vim_key_notation_08.dump +++ b/runtime/syntax/testdir/dumps/vim_key_notation_08.dump @@ -1,20 +1,20 @@ -|<+0#e000e06#ffffff0|D|r|o|p|>| +0#0000000&@68 -|<+0#e000e06&|N|u|l|>| +0#0000000&@69 -|<+0#e000e06&|S|N|R|>| +0#0000000&@69 -|<+0#e000e06&|P|l|u|g|>| +0#0000000&@68 -|<+0#e000e06&|C|u|r|s|o|r|H|o|l|d|>| +0#0000000&@62 -><+0#e000e06&|I|g|n|o|r|e|>| +0#0000000&@66 -|<+0#e000e06&|C|m|d|>| +0#0000000&@69 -|<+0#e000e06&|S|c|r|i|p|t|C|m|d|>| +0#0000000&@63 -|<+0#e000e06&|F|o|c|u|s|G|a|i|n|e|d|>| +0#0000000&@61 -|<+0#e000e06&|F|o|c|u|s|L|o|s|t|>| +0#0000000&@63 -@75 -|<+0#e000e06&|c|w|o|r|d|>| +0#0000000&@67 -|<+0#e000e06&|c|W|O|R|D|>| +0#0000000&@67 -|<+0#e000e06&|c|e|x|p|r|>| +0#0000000&@67 -|<+0#e000e06&|c|f|i|l|e|>| +0#0000000&@67 -|<+0#e000e06&|a|f|i|l|e|>| +0#0000000&@67 -|<+0#e000e06&|a|b|u|f|>| +0#0000000&@68 -|<+0#e000e06&|a|m|a|t|c|h|>| +0#0000000&@66 -|<+0#e000e06&|s|f|i|l|e|>| +0#0000000&@67 -@57|1|4|5|,|1| @8|9|6|%| +| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|<+0#e000e06&|X|2|R|e|l|e|a|s|e|>| +0#0000000&@55 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|D|r|o|p|>| +0#0000000&@60 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|N|u|l|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|S|N|R|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|P|l|u|g|>| +0#0000000&@60 +@6>\+0#e000e06&| +0#0000000&|<+0#e000e06&|C|u|r|s|o|r|H|o|l|d|>| +0#0000000&@54 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|I|g|n|o|r|e|>| +0#0000000&@58 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|C|m|d|>| +0#0000000&@61 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|S|c|r|i|p|t|C|m|d|>| +0#0000000&@55 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|o|c|u|s|G|a|i|n|e|d|>| +0#0000000&@53 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|o|c|u|s|L|o|s|t|>| +0#0000000&@55 +@6|\+0#e000e06&| +0#0000000&@67 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|c|w|o|r|d|>| +0#0000000&@59 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|c|W|O|R|D|>| +0#0000000&@59 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|c|e|x|p|r|>| +0#0000000&@59 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|c|f|i|l|e|>| +0#0000000&@59 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|a|f|i|l|e|>| +0#0000000&@59 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|a|b|u|f|>| +0#0000000&@60 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|a|m|a|t|c|h|>| +0#0000000&@58 +@57|1|4|5|,|7| @8|9|5|%| diff --git a/runtime/syntax/testdir/dumps/vim_key_notation_09.dump b/runtime/syntax/testdir/dumps/vim_key_notation_09.dump index d7fc77deb1..d9adc7b3fa 100644 --- a/runtime/syntax/testdir/dumps/vim_key_notation_09.dump +++ b/runtime/syntax/testdir/dumps/vim_key_notation_09.dump @@ -1,9 +1,11 @@ -|<+0#e000e06#ffffff0|s|f|i|l|e|>| +0#0000000&@67 -|<+0#e000e06&|s|t|a|c|k|>| +0#0000000&@67 -|<+0#e000e06&|s|c|r|i|p|t|>| +0#0000000&@66 -|<+0#e000e06&|s|l|n|u|m|>| +0#0000000&@67 -|<+0#e000e06&|s|f|l|n|u|m|>| +0#0000000&@66 -><+0#e000e06&|c|l|i|e|n|t|>| +0#0000000&@66 +| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|<+0#e000e06&|a|m|a|t|c|h|>| +0#0000000&@58 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|s|f|i|l|e|>| +0#0000000&@59 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|s|t|a|c|k|>| +0#0000000&@59 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|s|c|r|i|p|t|>| +0#0000000&@58 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|s|l|n|u|m|>| +0#0000000&@59 +@6>\+0#e000e06&| +0#0000000&|<+0#e000e06&|s|f|l|n|u|m|>| +0#0000000&@58 +@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|c|l|i|e|n|t|>| +0#0000000&@58 +@75 |~+0#4040ff13&| @73 |~| @73 |~| @73 @@ -15,6 +17,4 @@ |~| @73 |~| @73 |~| @73 -|~| @73 -|~| @73 -| +0#0000000&@56|1|6|3|,|1| @8|B|o|t| +| +0#0000000&@56|1|6|3|,|7| @8|B|o|t| diff --git a/runtime/syntax/testdir/input/vim_key_notation.vim b/runtime/syntax/testdir/input/vim_key_notation.vim index 8bc128a4d3..8572499293 100644 --- a/runtime/syntax/testdir/input/vim_key_notation.vim +++ b/runtime/syntax/testdir/input/vim_key_notation.vim @@ -1,163 +1,165 @@ " Key notation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +map foo + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \