diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/third/vim/t-vim.tex')
-rw-r--r-- | Master/texmf-dist/tex/context/third/vim/t-vim.tex | 129 |
1 files changed, 126 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/context/third/vim/t-vim.tex b/Master/texmf-dist/tex/context/third/vim/t-vim.tex index 76dfab6b88a..930d49b7e6e 100644 --- a/Master/texmf-dist/tex/context/third/vim/t-vim.tex +++ b/Master/texmf-dist/tex/context/third/vim/t-vim.tex @@ -41,8 +41,62 @@ \edef\vimtyping::name{#1} \definesyntaxhighlighting[#1][\s!parent=\vimtyping::namespace#1] + + \setvalue{\e!start raw#1}{\bgroup\obeylines\dodoubleargument\vimtyping::start_raw[#1]} + \setvalue{\e!stop raw#1}{\vimtyping::stop_raw} + \setvalue{inlineraw#1}{\dodoubleargument\vimtyping::inline_raw[#1]} +\stoptexdefinition + +\starttexdefinition vimtyping::start_raw [#1][#2] + % #1 = filter + % #2 = options + \egroup %\bgroup in \start#1 + + \edef\vimtyping::name{#1} + + \begingroup % to keep assignments local + \setupvimtyping[#1][\c!name=,#2] + + \externalfilterparameter\c!before + + \externalfilter::attributes_start \externalfilter::id \c!style \c!color + \syntaxhighlighting::linenumbering_start + \processcommacommand[\externalfilterparameter\c!setups]\directsetup + \gobbleoneargument % For some reason the next argument is ^M +\stoptexdefinition + +\starttexdefinition vimtyping::stop_raw + + \syntaxhighlighting::linenumbering_stop + \externalfilter::attributes_stop + \externalfilterparameter\c!after + \endgroup + \stoptexdefinition +\starttexdefinition vimtyping::inline_raw [#1][#2] + % #1 = filter + % #2 = options + + \edef\vimtyping::name{#1} + + \begingroup % to keep assignments local + \setupvimtyping[#1][\c!name=,\c!before=,\c!after=,#2] + + \externalfilter::attributes_start \externalfilter::id \c!style \c!color + % We assume that the setups set minimal_catcodes + \processcommacommand[\externalfilterparameter\c!setups]\directsetup + + \vimtyping::inline_raw_aux +\stoptexdefinition + +\starttexdefinition vimtyping::inline_raw_aux #1 + #1 + \externalfilter::attributes_stop + \endgroup +\stoptexdefinition + + % Mode to testing the dev version of 2context script. \doifmodeelse{vim-dev} {\def\vimtyping::script_name{2context.vim}} @@ -139,6 +193,16 @@ } \stopsetups +\defineframed[vimtodoframed] + [ + \c!location=\v!low, + \c!frame=\v!off, + \c!background=\v!color, + \c!backgroundcolor=vimtodoyellow, + ] + +\definecolor[vimtodoyellow] + [h={E0E090}] \startsetups[vim-minor-groups] \definesyntaxgroup @@ -203,9 +267,11 @@ \definesyntaxgroup [Ignore] - \definesyntaxgroup - [Todo] - [\c!color={h=800000}] + \definesyntaxgroup + [Todo] + [\c!color={h=800000}, + \c!command=\vimtodoframed] + \definesyntaxgroup [Error] @@ -216,6 +282,11 @@ [\c!color={h=6a5acd}, \c!command=\underbar] + \definesyntaxgroup + [Todo] + [\c!color={h=800000}, + \c!command=\vimtodoframed] + \setups{vim-minor-groups} \definesyntaxgroup @@ -267,6 +338,58 @@ \setups{vim-minor-groups} \stopcolorscheme + +\startcolorscheme[kate] + % Temporary definition... will change + % . kw dsKeyword + % . dt dsDataType + % . dv dsDecVal + % . bn dsBaseN + % . fl dsFloat + % . ch dsChar + % . st dsString + % . co dsComment + % . ot dsOthers + % . al dsAlert + % . fu dsFunction + % . re dsRegionMarker + % . er dsError + \definesyntaxgroup + [kw] + [\c!color={h=007020}, \c!style=bold] + + \definesyntaxgroup + [dt] + [\c!color={h=902000}] + + \definesyntaxgroup + [dv, bn, fl] + [\c!color={h=40a070}] + + \definesyntaxgroup + [ch, st] + [\c!color={h=4070a0}] + + \definesyntaxgroup + [co] + [\c!color={h=60a0b0}, \c!style=italic] + + \definesyntaxgroup + [ot] + [\c!color={h=007020}] + + \definesyntaxgroup + [al, er] + [\c!color=red, \c!style=bold] + + \definesyntaxgroup + [fu] + [\c!color={h=06287e}] + + \definesyntaxgroup + [re] + +\stopcolorscheme \protectmodulecatcodes \stopmodule |