mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
runtime(vim): Update base-syntax, fix :unabbrev highlighting (#14077)
Fixes issue #7876 Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -273,7 +273,7 @@ function! s:get_vim_command_type(cmd_name)
|
||||
let menu_prefix = '^\%([acinosvx]\?\|tl\)'
|
||||
let map_prefix = '^[acilnostvx]\?'
|
||||
let exclude_list = [
|
||||
\ 'map',
|
||||
\ 'map', 'mapclear',
|
||||
\ 'substitute', 'smagic', 'snomagic',
|
||||
\ 'setlocal', 'setglobal', 'set', 'var',
|
||||
\ 'autocmd', 'doautocmd', 'doautoall',
|
||||
@@ -288,7 +288,7 @@ function! s:get_vim_command_type(cmd_name)
|
||||
|
||||
if index(exclude_list, a:cmd_name) != -1
|
||||
let ret = 99
|
||||
elseif a:cmd_name =~# '^\%(abbreviate\|noreabbrev\|\l\%(nore\)\?abbrev\)$'
|
||||
elseif a:cmd_name =~# '^\%(\%(un\)\?abbreviate\|noreabbrev\|\l\%(nore\|un\)\?abbrev\)$'
|
||||
let ret = 2
|
||||
elseif a:cmd_name =~# menu_prefix . '\%(nore\|un\)\?menu$'
|
||||
let ret = 3
|
||||
|
@@ -454,10 +454,11 @@ syn case match
|
||||
syn match vimMap "\<map\>\ze\s*(\@!" skipwhite nextgroup=vimMapMod,vimMapLhs
|
||||
syn match vimMap "\<map!" contains=vimMapBang skipwhite nextgroup=vimMapMod,vimMapLhs
|
||||
" GEN_SYN_VIM: vimCommand map, START_STR='syn keyword vimMap', END_STR='skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs'
|
||||
" GEN_SYN_VIM: vimCommand mapclear, START_STR='syn keyword vimMap', END_STR=''
|
||||
" GEN_SYN_VIM: vimCommand mapclear, START_STR='syn keyword vimMap', END_STR='skipwhite nextgroup=vimMapMod'
|
||||
syn keyword vimMap mapc[lear] skipwhite nextgroup=vimMapBang,vimMapMod
|
||||
" GEN_SYN_VIM: vimCommand unmap, START_STR='syn keyword vimUnmap', END_STR='skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs'
|
||||
syn match vimMapLhs contained "\S\+" contains=vimNotation,vimCtrlChar skipwhite nextgroup=vimMapRhs
|
||||
syn match vimMapBang contained "!" skipwhite nextgroup=vimMapMod,vimMapLhs
|
||||
syn match vimMapBang contained "\a\@1<=!" skipwhite nextgroup=vimMapMod,vimMapLhs
|
||||
syn match vimMapMod contained "\%#=1\c<\(buffer\|expr\|\(local\)\=leader\|nowait\|plug\|script\|sid\|unique\|silent\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs
|
||||
syn match vimMapRhs contained ".*" contains=vimNotation,vimCtrlChar skipnl nextgroup=vimMapRhsExtend
|
||||
syn match vimMapRhsExtend contained "^\s*\\.*$" contains=vimContinue
|
||||
|
Reference in New Issue
Block a user