aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax/vim.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/syntax/vim.vim')
-rw-r--r--runtime/syntax/vim.vim24
1 files changed, 14 insertions, 10 deletions
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 7025ee5369..de8fa44556 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -3,8 +3,8 @@
" #############################################################################
" #############################################################################
" Note: Be careful when merging the upstream version of this file.
-" Much of this is generated by scripts/genvimvim.lua (result is installed
-" to: $VIMRUNTIME/syntax/vim/generated.vim)
+" Much of this is generated by scripts/genvimvim.lua
+" (installs to $VIMRUNTIME/syntax/vim/generated.vim)
" #############################################################################
" #############################################################################
@@ -128,6 +128,13 @@ if exists("g:vimsyntax_noerror")
let g:vimsyn_noerror= g:vimsyntax_noerror
endif
+" Variable options {{{2
+if exists("g:vim_maxlines")
+ let s:vimsyn_maxlines= g:vim_maxlines
+else
+ let s:vimsyn_maxlines= 60
+endif
+
" Numbers {{{2
" =======
syn match vimNumber "\<\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand
@@ -601,7 +608,7 @@ syn region vimGlobal matchgroup=Statement start='\<v\%[global]!\=/' skip='\\.' e
" g:vimsyn_embed =~# 'r' : embed ruby
" g:vimsyn_embed =~# 't' : embed tcl
if !exists("g:vimsyn_embed")
- let g:vimsyn_embed= "lpPr"
+ let g:vimsyn_embed= 0
endif
" [-- lua --] {{{3
@@ -744,9 +751,10 @@ if !filereadable(s:mzschemepath)
endif
if g:vimsyn_embed =~# 'm' && filereadable(s:mzschemepath)
unlet! b:current_syntax
- let iskKeep= &isk
+ let s:iskKeep= &isk
exe "syn include @vimMzSchemeScript ".s:mzschemepath
- let &isk= iskKeep
+ let &isk= s:iskKeep
+ unlet s:iskKeep
VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimMzSchemeScript
VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*$+ end=+\.$+ contains=@vimMzSchemeScript
syn cluster vimFuncBodyList add=vimMzSchemeRegion
@@ -761,11 +769,7 @@ unlet s:mzschemepath
if exists("g:vimsyn_minlines")
exe "syn sync minlines=".g:vimsyn_minlines
endif
-if exists("g:vimsyn_maxlines")
- exe "syn sync maxlines=".g:vimsyn_maxlines
-else
- syn sync maxlines=60
-endif
+exe "syn sync maxlines=".s:vimsyn_maxlines
syn sync linecont "^\s\+\\"
syn sync match vimAugroupSyncA groupthere NONE "\<aug\%[roup]\>\s\+[eE][nN][dD]"