aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-09-09 13:14:15 +0200
committerJustin M. Keyes <justinkz@gmail.com>2017-09-17 20:07:31 +0200
commit20a79706e20c74b257d05cffdda372f516679a4a (patch)
tree85cfe57e402847b9c70b2c40964d7ea198fa731e
parent12efbf897de28f00523885ceb99fb7cf41ed82e6 (diff)
downloadrneovim-20a79706e20c74b257d05cffdda372f516679a4a.tar.gz
rneovim-20a79706e20c74b257d05cffdda372f516679a4a.tar.bz2
rneovim-20a79706e20c74b257d05cffdda372f516679a4a.zip
runtime/syntax/vim.vim: disable g:vimsyn_embed by default
This feature is extremely slow. Also merge some minor upstream differences (missed by a previous merge).
-rw-r--r--runtime/doc/syntax.txt7
-rw-r--r--runtime/syntax/vim.vim24
2 files changed, 17 insertions, 14 deletions
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index fd17e3b381..73841edb09 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -3270,11 +3270,10 @@ improve screen updating rates (see |:syn-sync| for more on this). >
The g:vimsyn_embed option allows users to select what, if any, types of
embedded script highlighting they wish to have. >
- g:vimsyn_embed == 0 : don't embed any scripts
- g:vimsyn_embed =~ 'P' : support embedded python
+ g:vimsyn_embed == 0 : disable (don't embed any scripts)
+ g:vimsyn_embed == 'lPr' : support embedded lua, python and ruby
<
-By default, g:vimsyn_embed is a string supporting interpreters that your vim
-itself supports.
+This option is disabled by default.
*g:vimsyn_folding*
Some folding is now supported with syntax/vim.vim: >
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]"