runtime(vim): Update base-syntax, improve :menu{,translate} highlighting (#14162)

Improve :menu and :menutranslate highlighting.

- Match args to :menutranslation and :popup.
- Only highlight special notation in {rhs} of :menu, like :map.
- Allow line continuations in {rhs} of :menu and between {english} and
  {mylang} of :menutranslation, matching common usage.
- Bug fixes.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
dkearns
2024-03-10 03:43:28 +11:00
committed by GitHub
parent 35b867b685
commit 62b26040eb
14 changed files with 373 additions and 33 deletions

View File

@ -0,0 +1,51 @@
" Vim :menutranslate command
menutranslate clear
menutranslate clear | echo "Foo"
menutranslate clear " comment
menutranslate &Foo\ bar &FuBar | echo "Foo"
menutranslate &Foo\ bar &FuBar " comment
menutranslate \"&Foo"\ bar \"&FuBar
menutranslate &Foo\ "bar" &FuBar
menutranslate &Foo\ bar
\ &Fubar | echo "Foo"
menutranslate
\ &Foo\ bar
\ &Fubar | echo "Foo"
menutranslate
\ &Foo\ bar
\ &Fubar| echo "Foo"
menutranslate
\ &Foo\ bar
\ &Fubar
\ | echo "Foo"
menutranslate &Foo\ bar
"\ comment
\ &Fubar | echo "Foo"
menutranslate
"\ comment
\ &Foo\ bar
"\ comment
\ &Fubar | echo "Foo"
menutranslate
\ &Foo\ bar
"\ comment
\ &Fubar| echo "Foo"
"\ comment
menutranslate
"\ comment
\ &Foo\ bar
"\ comment
\ &Fubar
\ | echo "Foo"