neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 95b03171df223e1fed5de15124a3b9204f37048a
parent 8c0c34786e5468bf0f0d0fbc60aeafa3febb5337
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Mon, 26 Jan 2026 07:25:11 +0800

Merge pull request #37556 from zeertzjq/vim-9.1.2109

vim-patch: runtime file updates
Diffstat:
Mruntime/doc/l10n-russian.txt | 8++++----
Mruntime/doc/l10n-vietnamese.txt | 18+++++++++---------
Mruntime/doc/spell.txt | 4----
Mruntime/doc/syntax.txt | 8++++----
Aruntime/ftplugin/skhd.vim | 20++++++++++++++++++++
Mruntime/ftplugin/toml.vim | 5+++--
Mruntime/keymap/esperanto_utf-8.vim | 8++++----
Mruntime/keymap/greek_utf-8.vim | 4++--
Mruntime/keymap/hebrewp_utf-8.vim | 56++++++++++++++++++++++++++++----------------------------
Mruntime/lua/vim/filetype.lua | 4++++
Aruntime/syntax/skhd.vim | 137+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mruntime/syntax/toml.vim | 18+++++++++---------
Mtest/old/testdir/test_filetype.vim | 2++
13 files changed, 226 insertions(+), 66 deletions(-)

diff --git a/runtime/doc/l10n-russian.txt b/runtime/doc/l10n-russian.txt @@ -8,13 +8,13 @@ Russian language localization and support in Vim *russian* *Russian* Type |gO| to see the table of contents. -=============================================================================== +============================================================================== 1. Introduction *russian-intro* Russian language is supported perfectly well in Vim. You can type and view Russian text just as any other, without the need to tweak the settings. -=============================================================================== +============================================================================== 2. Russian keymaps *russian-keymap* To switch between languages you can use your system native keyboard switcher, @@ -37,7 +37,7 @@ enter Normal mode command, you can also set 'langmap' option: You have to type this command in one line, it is wrapped for the sake of readability. -=============================================================================== +============================================================================== 3. Localization *russian-l18n* If you wish to use messages, help files, menus and other items translated to @@ -52,7 +52,7 @@ $VIMRUNTIME directory. We recommend using UTF-8 archive. In order to use the Russian documentation, make sure you have set the 'helplang' option to "ru". -=============================================================================== +============================================================================== 4. Known issues *russian-issues* -- If you are using Russian message translations in Win32 console, then diff --git a/runtime/doc/l10n-vietnamese.txt b/runtime/doc/l10n-vietnamese.txt @@ -5,7 +5,7 @@ Type |gO| to see the table of contents. -=============================================================================== +============================================================================== 1. Introduction *vietnamese-intro* Vim supports Vietnamese language in the following ways: @@ -14,7 +14,7 @@ Vim supports Vietnamese language in the following ways: in |Insert-mode| and |search-commands| using US keyboard layout. - Localization in Vietnamese. See |vietnamese-l10n| -=============================================================================== +============================================================================== 2. Vietnamese keymaps *vietnamese-keymap* To switch between languages you can use your system native keyboard switcher, @@ -39,12 +39,12 @@ Since these keymaps were designed to be minimalistic, they do not support all features of the corresponding input methods. The differences are described below: -- You can only type each character individually, entering the base letter first - and then the diacritics later. For example, to type the word `nến` using - |vietnamese-vni_utf-8|, you must type `ne61n`, not `nen61` or `ne6n1` -- For characters with more than 1 diacritic, you need to type vowel mark before - tone mark. For example, to type `ồ` using |vietnamese-telex_utf-8|, you need - to type `oof`, not `ofo`. +- You can only type each character individually, entering the base letter + first and then the diacritics later. For example, to type the word `nến` + using |vietnamese-vni_utf-8|, you must type `ne61n`, not `nen61` or `ne6n1` +- For characters with more than 1 diacritic, you need to type vowel mark + before tone mark. For example, to type `ồ` using |vietnamese-telex_utf-8|, you + need to type `oof`, not `ofo`. - With |vietnamese-telex_utf-8|, you need to type all uppercase letters to produce uppercase characters with diacritics. For example, `Ừ` must be typed as `UWF`. @@ -56,7 +56,7 @@ below: supported. - Removing diacritics using `z` in Telex or `0` in VNI and VIQR is not supported. -=============================================================================== +============================================================================== 3. Localization *vietnamese-l10n* Vim |messages| are also available in Vietnamese. If you wish to see messages diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt @@ -496,10 +496,6 @@ The older, OpenOffice 2 files may be used if this doesn't work: You can also use a plain word list. The results are the same, the choice depends on what word lists you can find. -If you install Aap (from www.a-a-p.org) you can use the recipes in the -runtime/spell/??/ directories. Aap will take care of downloading the files, -apply patches needed for Vim and build the .spl file. - Make sure your current locale is set properly, otherwise Vim doesn't know what characters are upper/lower case letters. If the locale isn't available (e.g., when using an MS-Windows codepage on Unix) add tables to the .aff file diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt @@ -2222,10 +2222,10 @@ package, arrange for files to be recognized as groff input (see GNU troff differs from older AT&T n/troff programs (that you may still find in Solaris or Plan 9) by extending the "*roff" language syntax. For example, in AT&T troff, you access the count of years since 1900 with the escape sequence -\(yr. In groff you can do the same, which it recognizes for compatibility, or -use groff's extended syntax, \[yr]. AT&T troff documented the yr register as -storing the "last two digits of current year", but had a Y2K problem; in -groff, you can access the Gregorian year correctly: \[year]. In groff, font, +\n(yr. In groff you can do the same, which it recognizes for compatibility, +or use groff's extended syntax, \n[yr]. AT&T troff documented the yr register +as storing the "last two digits of current year", but had a Y2K problem; in +groff, you can access the Gregorian year correctly: \n[year]. In groff, font, register, macro, string, and request names can exceed two characters; for example, with groff's mm package, the control lines ".VERBON" and ".VERBOFF" call macros of those names to bracket displays of "verbatim" content. diff --git a/runtime/ftplugin/skhd.vim b/runtime/ftplugin/skhd.vim @@ -0,0 +1,20 @@ +" Vim filetype plugin file +" Language: skhd(simple hotkey daemon for macOS) configuration file +" Maintainer: Kiyoon Kim <https://github.com/kiyoon> +" Last Change: 2026 Jan 23 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +setlocal comments=:# commentstring=#\ %s +setlocal formatoptions-=t formatoptions+=croql + +let b:undo_ftplugin = "setl com< cms< fo<" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/toml.vim b/runtime/ftplugin/toml.vim @@ -3,7 +3,7 @@ " Homepage: https://github.com/cespare/vim-toml " Maintainer: Aman Verma " Author: Lily Ballard <lily@ballards.net> -" Last Change: Sep 21, 2021 +" Last Change: May 5, 2025 if exists('b:did_ftplugin') finish @@ -12,10 +12,11 @@ let b:did_ftplugin = 1 let s:save_cpo = &cpo set cpo&vim -let b:undo_ftplugin = 'setlocal commentstring< comments<' +let b:undo_ftplugin = 'setlocal commentstring< comments< iskeyword<' setlocal commentstring=#\ %s setlocal comments=:# +setlocal iskeyword+=- let &cpo = s:save_cpo unlet s:save_cpo diff --git a/runtime/keymap/esperanto_utf-8.vim b/runtime/keymap/esperanto_utf-8.vim @@ -7,7 +7,7 @@ " " All keys same as usual, except: " ^ followed by any of CcGgHhJjSs adds a circumflex on top of the letter -" and replaces the grave accent by a breve +" ù and Ù replaces the grave accent by a breve " any of CcGgHhJjSsUu followed by X or x maps to consonant with ^ or Uu with " breve. @@ -21,7 +21,7 @@ let b:keymap_name = "Eo" " digraph C> 0x0108 c> 0x0109 G> 0x011C g> 0x011D H> 0x0124 h> 0x0125 " digraph J> 0x0134 j> 0x0135 S> 0x015C s> 0x015D U( 0x016C u( 0x016D -scriptencoding latin1 +scriptencoding utf-8 loadkeymap @@ -35,8 +35,8 @@ loadkeymap ^j <Char-0x0135> " (309) LOWERCASE j WITH CIRCUMFLEX ^S <Char-0x015C> " (348) UPPERCASE S WITH CIRCUMFLEX ^s <Char-0x015D> " (349) LOWERCASE s WITH CIRCUMFLEX - <Char-0x016C> " (364) UPPERCASE U WITH BREVE - <Char-0x016D> " (365) LOWERCASE u WITH BREVE +Ù <Char-0x016C> " (364) UPPERCASE U WITH BREVE +ù <Char-0x016D> " (365) LOWERCASE u WITH BREVE CX <Char-0x0108> " (264) UPPERCASE C WITH CIRCUMFLEX Cx <Char-0x0108> " (264) UPPERCASE C WITH CIRCUMFLEX diff --git a/runtime/keymap/greek_utf-8.vim b/runtime/keymap/greek_utf-8.vim @@ -557,8 +557,8 @@ v| <char-0x1FF3> " GREEK SMALL LETTER OMEGA WITH YPOGEGRAMMENI " " " Greek Quotes if your keyboard supports them - <char-0x201C> " QUOTEDBLLEFT - <char-0x201D> " QUOTEDBLRIGHT +´ <char-0x201C> " QUOTEDBLLEFT +ª <char-0x201D> " QUOTEDBLRIGHT " " " diff --git a/runtime/keymap/hebrewp_utf-8.vim b/runtime/keymap/hebrewp_utf-8.vim @@ -6,33 +6,33 @@ " Use this short name in the status line. let b:keymap_name = "hebp" loadkeymap -w <char-0x5e9> " - shin -n <char-0x5e0> " - nun -b <char-0x5d1> " - bet -g <char-0x5d2> " - gimel -q <char-0x5e7> " - qof -k <char-0x5db> " - kaf -g <char-0x5e2> " - ayin -y <char-0x5d9> " - yod -N <char-0x5df> " - final nun -j <char-0x5d7> " - het -l <char-0x5dc> " - lamed -K <char-0x5da> " - final kaf -x <char-0x5e6> " - tsadi -m <char-0x5de> " - mem -M <char-0x5dd> " - final mem -p <char-0x5e4> " - pe -r <char-0x5e8> " - resh -d <char-0x5d3> " - dalet -a <char-0x5d0> " - alef -v <char-0x5d5> " - vav -h <char-0x5d4> " - he -s <char-0x5e1> " - samekh -T <char-0x5d8> " - tet -z <char-0x5d6> " - zayin -t <char-0x5ea> " - tav -X <char-0x5e5> " - final tsadi -P <char-0x5e3> " - final pe +w <char-0x5e9> " ש - shin +n <char-0x5e0> " נ - nun +b <char-0x5d1> " ב - bet +g <char-0x5d2> " ג - gimel +q <char-0x5e7> " ק - qof +k <char-0x5db> " כ - kaf +g <char-0x5e2> " ע - ayin +y <char-0x5d9> " י - yod +N <char-0x5df> " ן - final nun +j <char-0x5d7> " ח - het +l <char-0x5dc> " ל - lamed +K <char-0x5da> " ך - final kaf +x <char-0x5e6> " צ - tsadi +m <char-0x5de> " מ - mem +M <char-0x5dd> " ם - final mem +p <char-0x5e4> " פ - pe +r <char-0x5e8> " ר - resh +d <char-0x5d3> " ד - dalet +a <char-0x5d0> " א - alef +v <char-0x5d5> " ו - vav +h <char-0x5d4> " ה - he +s <char-0x5e1> " ס - samekh +T <char-0x5d8> " ט - tet +z <char-0x5d6> " ז - zayin +t <char-0x5ea> " ת - tav +X <char-0x5e5> " ץ - final tsadi +P <char-0x5e3> " ף - final pe A: <Char-0x5b0> " sheva HE <Char-0x5b1> " hataf segol HA <Char-0x5b2> " hataf patah @@ -47,7 +47,7 @@ U <Char-0x5bb> " qubuts D <Char-0x5bc> " dagesh ]T <Char-0x5bd> " meteg ]Q <Char-0x5be> " maqaf -]R <Char-0x5bf> " rafe +]R <ּChar-0x5bf> " rafe ]p <Char-0x5c0> " paseq SR <Char-0x5c1> " shin-dot SL <Char-0x5c2> " sin-dot diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua @@ -848,6 +848,8 @@ local extension = { NSP = 'natural', NSS = 'natural', ncf = 'ncf', + axs = 'netlinx', + axi = 'netlinx', nginx = 'nginx', ncl = 'nickel', nim = 'nim', @@ -1904,6 +1906,8 @@ local filename = { ['.tcshrc'] = detect.tcsh, ['tcsh.login'] = detect.tcsh, ['tcsh.tcshrc'] = detect.tcsh, + ['.skhdrc'] = 'skhd', + ['skhdrc'] = 'skhd', ['/etc/slp.conf'] = 'slpconf', ['/etc/slp.reg'] = 'slpreg', ['/etc/slp.spi'] = 'slpspi', diff --git a/runtime/syntax/skhd.vim b/runtime/syntax/skhd.vim @@ -0,0 +1,137 @@ +" Vim syntax file +" Language: skhd configuration file +" Maintainer: Kiyoon Kim <https://github.com/kiyoon> +" Last Change: 2025 Jan 22 + +if exists("b:current_syntax") + finish +endif + +" Comments: whole line from '#' +syn match skhdComment /^\s*#.*/ + +" Modifiers (shift, ctrl, alt, cmd, fn) +syn keyword skhdModifier + \ alt lalt ralt + \ shift lshift rshift + \ cmd lcmd rcmd + \ ctrl lctrl rctrl + \ fn hyper meh + \ option super +" highlight the '+' and '-' and ':' separators +syn match skhdOperator /->/ +syn match skhdOperator /[+:\-;<>,\[\]@~]/ + +" Hex keycode form: 0x3C etc +syn match skhdKeycode /\v0x[0-9A-Fa-f]+/ + +" Keys (a–z, digits, function‐keys, arrows…) +syn keyword skhdKey + \ return tab space backspace escape delete + \ home end pageup pagedown insert + \ left right up down + \ sound_up sound_down mute play previous next rewind fast + \ brightness_up brightness_down illumination_up illumination_down +syn match skhdKey /\vf([1-9]|1[0-9]|20)\>/ +syn match skhdKey /\v\<[A-Za-z0-9]\>/ + +" The yabai command and its subcommands +syn match skhdCommand /\<yabai\>\|\<open\>/ +syn match skhdSubCmd /\<window\>\|\<space\>\|\<display\>/ + +" ─────────────────────────────────────────────────────────────────── +" Treat anything after a single “:” (not double‑colon) as bash +" ─────────────────────────────────────────────────────────────────── +" load Vim’s built‑in shell rules +syntax include @bash syntax/bash.vim + +" After `:` (not `::`) is a bash command, but not when it is preceded by a `\` +syn region skhdBash + \ matchgroup=skhdOperator + \ start=/\v(^|[^:])\zs:\s*/ + \ end=/\v\s*$\ze/ + \ skip=/\v\\\s*$/ + \ keepend + \ contains=@bash + +" ──────────────────────────────────────────────────────────────── +" Key‑map group definitions and switches +" ──────────────────────────────────────────────────────────────── +" In skhd, you can define groups and assign hotkeys to them as follows: +" 1. Group‑definition lines that start with :: <group> +" 2. Switch operator (<) +" 3. Target group names after the ; + +" Lines like `:: default` or `:: passthrough` +" match the whole thing as a GroupDef, but capture the group name +syn match skhdGroupDef /^::\s*\w\+/ +syn match skhdGroupName /::\s*\zs\w\+/ + +" The `<` switch token in lines like +" passthrough < cmd + shift + alt - b ; default +syn match skhdSwitch /<\s*/ + +" The target (or “fall‑through”) group after the semicolon +" ... ; default +syn match skhdTargetGroup /;\s*\zs\w\+/ + + +" ------------------------------------------------------------ +" Application-specific bindings block: <keysym> [ ... ] +" ------------------------------------------------------------ + +" The whole block. This avoids grabbing .blacklist by requiring the line be just '[' at end. +syn region skhdProcMapBlock + \ matchgroup=skhdProcMapDelim + \ start=/\v\[\s*$/ + \ end=/^\s*\]\s*$/ + \ keepend + \ transparent + \ contains=skhdProcMapApp,skhdProcMapWildcard,skhdProcMapUnbind,skhdOperator,skhdComment,skhdBash,skhdString + +" App name on the left side: "Google Chrome" : +syn match skhdProcMapApp /^\s*\zs"[^"]*"\ze\s*:\s*/ contained + +" Wildcard entry: * : +syn match skhdProcMapWildcard /^\s*\zs\*\ze\s*:\s*/ contained + +" Unbind operator on the right side: "App" ~ or * ~ +syn match skhdProcMapUnbind /\v^\s*(\"[^"]*\"|\*)\s*\zs\~\ze\s*$/ contained + +syn keyword skhdDirective .load .blacklist +syn match skhdLoadLine /^\s*\.load\>\s\+/ contains=skhdDirective + +syn region skhdBlacklistBlock + \ start=/^\s*\.blacklist\>\s*\[\s*$/ + \ end=/^\s*\]\s*$/ + \ keepend + \ contains=skhdDirective,skhdComment,skhdString + +syn region skhdString start=/"/ skip=/\\"/ end=/"/ + +" ──────────────────────────────────────────────────────────────── +" Linking to standard Vim highlight groups +" ──────────────────────────────────────────────────────────────── +hi def link skhdComment Comment +hi def link skhdHeadline Title +hi def link skhdModifier Keyword +hi def link skhdOperator Operator +hi def link skhdWildcard Special +hi def link skhdKey Identifier +hi def link skhdKeycode Number +hi def link skhdCommand Function +hi def link skhdSubCmd Statement +hi def link skhdGroupDef Label +hi def link skhdGroupName Identifier +hi def link skhdSwitch Operator +hi def link skhdTargetGroup Type +hi def link skhdString String + +hi def link skhdProcMapDelim Operator +hi def link skhdProcMapApp Type +hi def link skhdProcMapWildcard Special +hi def link skhdProcMapUnbind Special + +hi def link skhdDirective PreProc + +let b:current_syntax = "skhd" diff --git a/runtime/syntax/toml.vim b/runtime/syntax/toml.vim @@ -3,7 +3,7 @@ " Homepage: https://github.com/cespare/vim-toml " Maintainer: Aman Verma " Previous Maintainer: Caleb Spare <cespare@gmail.com> -" Last Change: Oct 8, 2021 +" Last Change: May 5, 2025 if exists('b:current_syntax') finish @@ -23,15 +23,15 @@ syn region tomlString oneline start=/'/ end=/'/ " Multi-line literal strings syn region tomlString start=/'''/ end=/'''/ -syn match tomlInteger /[+-]\=\<[1-9]\(_\=\d\)*\>/ display -syn match tomlInteger /[+-]\=\<0\>/ display -syn match tomlInteger /[+-]\=\<0x[[:xdigit:]]\(_\=[[:xdigit:]]\)*\>/ display -syn match tomlInteger /[+-]\=\<0o[0-7]\(_\=[0-7]\)*\>/ display -syn match tomlInteger /[+-]\=\<0b[01]\(_\=[01]\)*\>/ display -syn match tomlInteger /[+-]\=\<\(inf\|nan\)\>/ display +syn match tomlInteger /[+-]\=[1-9]\(_\=\d\)*/ display +syn match tomlInteger /[+-]\=0/ display +syn match tomlInteger /[+-]\=0x[[:xdigit:]]\(_\=[[:xdigit:]]\)*/ display +syn match tomlInteger /[+-]\=0o[0-7]\(_\=[0-7]\)*/ display +syn match tomlInteger /[+-]\=0b[01]\(_\=[01]\)*/ display +syn match tomlInteger /[+-]\=\(inf\|nan\)/ display -syn match tomlFloat /[+-]\=\<\d\(_\=\d\)*\.\d\+\>/ display -syn match tomlFloat /[+-]\=\<\d\(_\=\d\)*\(\.\d\(_\=\d\)*\)\=[eE][+-]\=\d\(_\=\d\)*\>/ display +syn match tomlFloat /[+-]\=\d\(_\=\d\)*\.\d\+/ display +syn match tomlFloat /[+-]\=\d\(_\=\d\)*\(\.\d\(_\=\d\)*\)\=[eE][+-]\=\d\(_\=\d\)*/ display syn match tomlBoolean /\<\%(true\|false\)\>/ display diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim @@ -575,6 +575,7 @@ func s:GetFilenameChecks() abort \ 'ncf': ['file.ncf'], \ 'neomuttlog': ['/home/user/.neomuttdebug1'], \ 'neomuttrc': ['Neomuttrc', '.neomuttrc', '.neomuttrc-file', '/.neomutt/neomuttrc', '/.neomutt/neomuttrc-file', 'Neomuttrc', 'Neomuttrc-file', 'any/.neomutt/neomuttrc', 'any/.neomutt/neomuttrc-file', 'neomuttrc', 'neomuttrc-file'], + \ 'netlinx': ['file.axs', 'file.axi'], \ 'netrc': ['.netrc'], \ 'nginx': ['file.nginx', 'nginxfile.conf', 'filenginx.conf', 'any/etc/nginx/file', 'any/usr/local/nginx/conf/file', 'any/nginx/file.conf'], \ 'nickel': ['file.ncl'], @@ -737,6 +738,7 @@ func s:GetFilenameChecks() abort \ 'simula': ['file.sim'], \ 'sinda': ['file.sin', 'file.s85'], \ 'sisu': ['file.sst', 'file.ssm', 'file.ssi', 'file.-sst', 'file._sst', 'file.sst.meta', 'file.-sst.meta', 'file._sst.meta'], + \ 'skhd': ['.skhdrc', 'skhdrc'], \ 'skill': ['file.il', 'file.ils', 'file.cdf'], \ 'slang': ['file.sl'], \ 'slice': ['file.ice'],