runtime(vim): Update syntax file (#13948)

Improve string escape sequence and special key matching.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
dkearns
2024-02-02 07:44:26 +11:00
committed by GitHub
parent 9204f39580
commit e3e3934bb1
19 changed files with 487 additions and 31 deletions

View File

@ -4,6 +4,23 @@ echo 'It''s a string'
echo 'tab: \t, new line: \n, backslash: \\'
echo "tab: \t, new line: \n, backslash: \\"
" String escape sequences
echo "\316 - \31 - \3 - \x1f - \xf - \X1F - \XF - \u02a4 - \U000002a4 - \b - \e - \f - \n - \r - \t - \\ - \" - \<C-W>"
echo '\316 \31 \3 \x1f \xf \X1F \XF \u02a4 \U000002a4 \b \e \f \n \r \t \\ \" \<C-W>'
echo "\3160 - \x1f0 - \X1F0 - \u02a40 - \U000002a40"
echo $"\316 - \31 - \3 - \x1f - \xf - \X1F - \XF - \u02a4 - \U000002a4 - \b - \e - \f - \n - \r - \t - \\ - \" - \<C-W>"
echo $'\316 \31 \3 \x1f \xf \X1F \XF \u02a4 \U000002a4 \b \e \f \n \r \t \\ \" \<C-W>'
echo $"\3160 - \x1f0 - \X1F0 - \u02a40 - \U000002a40"
echo "\<C-a>"
echo "\<*C-a>"
echo "\<C->>"
echo "\<*C->>"
echo "\<C->>>"
echo "\<*C->>>"
" String interpolation
echo 'Don''t highlight interpolation: {{ {1 + 2} }}'
@ -12,3 +29,4 @@ echo $'Highlight interpolation:\t{{ { string({'foo': 'bar'}) } }}'
echo $'Highlight interpolation:\t{{ { $'nested: {{ {1 + 2} }}' } }}'
echo $"Highlight interpolation:\t{{ { string({"foo": "bar"}) } }}"
echo $"Highlight interpolation:\t{{ { $"nested: {{ {1 + 2} }}" } }}"

View File

@ -0,0 +1,163 @@
" Key notation
<Space>
<Tab>
<Tab>
<NL>
<NewLine>
<LineFeed>
<LF>
<CR>
<Return>
<Enter>
<BS>
<BackSpace>
<Esc>
<CSI>
<xCSI>
<Bar>
<Bslash>
<Del>
<Delete>
<kDel>
<Up>
<Down>
<Left>
<Right>
<xUp>
<xDown>
<xLeft>
<xRight>
<PasteStart>
<PasteEnd>
<F1>
<F2>
<F3>
<F4>
<F5>
<F6>
<F7>
<F8>
<F9>
<F10>
<F11>
<F12>
<F13>
<F14>
<F15>
<F16>
<F17>
<F18>
<F19>
<F20>
<F21>
<F22>
<F23>
<F24>
<F25>
<F26>
<F27>
<F28>
<F29>
<F30>
<F31>
<F32>
<F33>
<F34>
<F35>
<F36>
<F37>
<xF1>
<xF2>
<xF3>
<xF4>
<Help>
<Undo>
<Insert>
<Ins>
<kInsert>
<Home>
<kHome>
<xHome>
<zHome>
<End>
<kEnd>
<xEnd>
<zEnd>
<PageUp>
<PageDown>
<kPageUp>
<kPageDown>
<kPlus>
<kMinus>
<kDivide>
<kMultiply>
<kEnter>
<kPoint>
<k0>
<k1>
<k2>
<k3>
<k4>
<k5>
<k6>
<k7>
<k8>
<k9>
<lt>
<Mouse>
<NetMouse>
<DecMouse>
<JsbMouse>
<PtermMouse>
<UrxvtMouse>
<SgrMouse>
<SgrMouseRelease>
<LeftMouse>
<LeftMouseNM>
<LeftDrag>
<LeftRelease>
<LeftReleaseNM>
<MouseMove>
<MiddleMouse>
<MiddleDrag>
<MiddleRelease>
<RightMouse>
<RightDrag>
<RightRelease>
<ScrollWheelUp>
<ScrollWheelDown>
<ScrollWheelRight>
<ScrollWheelLeft>
<MouseDown>
<MouseUp>
<X1Mouse>
<X1Drag>
<X1Release>
<X2Mouse>
<X2Drag>
<X2Release>
<Drop>
<Nul>
<SNR>
<Plug>
<CursorHold>
<Ignore>
<Cmd>
<ScriptCmd>
<FocusGained>
<FocusLost>
<cword>
<cWORD>
<cexpr>
<cfile>
<afile>
<abuf>
<amatch>
<sfile>
<stack>
<script>
<slnum>
<sflnum>
<client>