diff options
author | Norbert Preining <norbert@preining.info> | 2020-06-24 03:01:16 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-06-24 03:01:16 +0000 |
commit | f566a9b0d006a4d1aaa8501e771f6a5b7a55f9fe (patch) | |
tree | e0fb3eaba13adc65218e29780ecc59a14e237b43 /macros/context/contrib/context-vim/tex/context/third/vim/t-syntax-highlight.mkiv | |
parent | f18fa52d41e3ef33839ba943fe4987a6825ed278 (diff) |
CTAN sync 202006240301
Diffstat (limited to 'macros/context/contrib/context-vim/tex/context/third/vim/t-syntax-highlight.mkiv')
-rw-r--r-- | macros/context/contrib/context-vim/tex/context/third/vim/t-syntax-highlight.mkiv | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/macros/context/contrib/context-vim/tex/context/third/vim/t-syntax-highlight.mkiv b/macros/context/contrib/context-vim/tex/context/third/vim/t-syntax-highlight.mkiv index 7c31c8f6a3..a056730174 100644 --- a/macros/context/contrib/context-vim/tex/context/third/vim/t-syntax-highlight.mkiv +++ b/macros/context/contrib/context-vim/tex/context/third/vim/t-syntax-highlight.mkiv @@ -97,10 +97,10 @@ {\language\minusone}% \def\obeyedline{\strut\par} + \activatespacehandler{\????syntaxhighlighting\externalfilterparameter\c!space:\externalfilterparameter\c!lines} \setcatcodetable\externalfilter@minimal_catcodes% \letcharcode\endoflineasciicode\obeyedline \letcharcode\spaceasciicode\obeyedspace - \activatespacehandler{\????syntaxhighlighting\externalfilterparameter\c!space} \raggedright \stopsetups @@ -120,7 +120,7 @@ \c!method=\v!type, \c!start=\externalfilterparameter{\c!number\c!start}, \c!step=\externalfilterparameter{\c!number\c!step}, - \c!continue=\externalfilterparameter{\c!number\c!continue}, + \c!continue=\externalfilterparameter{\c!number\c!continue}, ]} \dostarttagged\t!syntaxhighlighting\colorscheme@name \stoptexdefinition @@ -191,40 +191,40 @@ ] % Space handler -% -% The space handing code for MkII and MkIV is not consistent. So, we provide our -% own versions. -\setvalue{\????syntaxhighlighting::\c!lines::\v!split}{\hskip} -\setvalue{\????syntaxhighlighting::\c!lines::\v!fixed}{\dontleavehmode\kern} +% Invisible space, don't split +\installspacemethod {\????syntaxhighlighting\v!off:\v!fixed} + {\def\obeyedspace{\mathortext\normalspace\explicitfixedspace}} -% default -\setvalue{\????syntaxhighlighting::\c!lines::}{\dontleavehmode\kern} +% Invisible space, allow split +\installspacemethod {\????syntaxhighlighting\v!off:\v!split} + {\def\obeyedspace{\mathortext\normalspace\explicitobeyedspace}} -\def\syntaxhighlighting@split% - {\getvalue{\????syntaxhighlighting::\c!lines::\externalfilterparameter\c!lines}} +% Visible space, don't split +\installspacemethod {\????syntaxhighlighting\v!on:\v!fixed} + {\def\obeyedspace{\mathortext\normalspace\optionalcontrolspace}} + +% Visible space, allow split +\installspacemethod {\????syntaxhighlighting\v!on:\v!split} + {\def\obeyedspace{\mathortext\normalspace\explicitcontrolspace}} + +% Default: line=empty +\installspacemethod {\????syntaxhighlighting\v!off:} + {\activatespacehandler {\????syntaxhighlighting\v!off:\v!fixed}} -% Visible space \installspacemethod {\????syntaxhighlighting\v!on} - {\unexpanded\def\obeyedspace - {\mathortext\normalspace - {\syntaxhighlighting@split\zeropoint\relax - \hbox{\normalcontrolspace}% - \syntaxhighlighting@split\zeropoint\relax}}% - \letcharcode\spaceasciicode\obeyedspace} - -% Invisible space -\installspacemethod {\????syntaxhighlighting\v!off} - {\unexpanded\def\obeyedspace - {\mathortext\normalspace - {\syntaxhighlighting@split\interwordspace\relax}}% - \letcharcode\spaceasciicode\obeyedspace} - -% Default -\installspacemethod {\????syntaxhighlighting} - {\activatespacehandler {\????syntaxhighlighting\v!off}} - -% Line highlighting + {\activatespacehandler {\????syntaxhighlighting\v!on:\v!fixed}} + +% space=empty, line=something +\installspacemethod {\????syntaxhighlighting:\v!fixed} + {\activatespacehandler {\????syntaxhighlighting\v!off:\v!fixed}} + +\installspacemethod {\????syntaxhighlighting:\v!split} + {\activatespacehandler {\????syntaxhighlighting\v!off:\v!split}} + +% Both empty +\installspacemethod {\????syntaxhighlighting:} + {\activatespacehandler {\????syntaxhighlighting\v!off:\v!fixed}} \definebar[syntaxhighlightline] [\c!order=\v!background, |