summaryrefslogtreecommitdiff
path: root/macros/context/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'macros/context/contrib')
-rw-r--r--macros/context/contrib/context-vim/VERSION2
-rw-r--r--macros/context/contrib/context-vim/doc/context/third/vim/vim.txt2
-rw-r--r--macros/context/contrib/context-vim/tex/context/third/vim/2context.vim48
-rw-r--r--macros/context/contrib/context-vim/tex/context/third/vim/t-vim.tex71
4 files changed, 53 insertions, 70 deletions
diff --git a/macros/context/contrib/context-vim/VERSION b/macros/context/contrib/context-vim/VERSION
index cf132c65ea..8d240647ad 100644
--- a/macros/context/contrib/context-vim/VERSION
+++ b/macros/context/contrib/context-vim/VERSION
@@ -1 +1 @@
-2020.04.29
+2020.05.17
diff --git a/macros/context/contrib/context-vim/doc/context/third/vim/vim.txt b/macros/context/contrib/context-vim/doc/context/third/vim/vim.txt
index 43d55333c4..ea2d474947 100644
--- a/macros/context/contrib/context-vim/doc/context/third/vim/vim.txt
+++ b/macros/context/contrib/context-vim/doc/context/third/vim/vim.txt
@@ -611,7 +611,7 @@ To disable loading of `vimrc` file, use
\definevimtyping
[...]
[...
- vimrc=none,
+ vimrc=,
...]
diff --git a/macros/context/contrib/context-vim/tex/context/third/vim/2context.vim b/macros/context/contrib/context-vim/tex/context/third/vim/2context.vim
index c83a731c5c..8032743e8a 100644
--- a/macros/context/contrib/context-vim/tex/context/third/vim/2context.vim
+++ b/macros/context/contrib/context-vim/tex/context/third/vim/2context.vim
@@ -1,8 +1,54 @@
" Author : Aditya Mahajan <adityam [at] umich [dot] edu>
-" version : 2020.04.25
+" version : 2020.05.17
" license : Simplified BSD License
" This script is part of the t-vim module for ConTeXt. It is based on 2html.vim.
+
+" This script is invoked by the `t-vim` module with the options
+" vim -c "syntax manual" -c "set syntax=name" ...
+" The option `syntax manual` loads `$VIMRUNTIME/syntax/manual.vim`, which
+" loads `$VIMRUNTIME/syntax/synload.vim`, which in turn loads,
+" `$VIMRUNTIME/syntax/syncolo.vim`, which defines syntax highlighting for
+" `preffered groups` and maps `minor groups` to `preffered groups`. See `:he
+" group-name` for details. We want the minor groups to appear in the output,
+" so we define a simple mapping for them:
+
+" Minor group of Constant
+hi String cterm=NONE
+hi Character cterm=NONE
+hi Number cterm=NONE
+hi Boolean cterm=NONE
+hi Float cterm=NONE
+
+" Minor group of Identifier
+hi Function cterm=NONE
+
+" Minor group of Statement
+hi Conditional cterm=NONE
+hi Repeat cterm=NONE
+hi Label cterm=NONE
+hi Operator cterm=NONE
+hi Keyword cterm=NONE
+hi Exception cterm=NONE
+
+" Minor group of PreProc
+hi Include cterm=NONE
+hi Define cterm=NONE
+hi Macro cterm=NONE
+hi PreCondit cterm=NONE
+
+" Minor group of Type
+hi StorageClass cterm=NONE
+hi Structure cterm=NONE
+hi Typedef cterm=NONE
+
+" Minor group of Special
+hi Tag cterm=NONE
+hi SpecialChar cterm=NONE
+hi Delimiter cterm=NONE
+hi SpecialComment cterm=NONE
+hi Debug cterm=NONE
+
" Since this script is called by the t-vim module, we assume that Two buffers
" are open. The first buffer is the input buffer, and the second buffer is the
" output buffer. The script parses content line-by-line from the first buffer
diff --git a/macros/context/contrib/context-vim/tex/context/third/vim/t-vim.tex b/macros/context/contrib/context-vim/tex/context/third/vim/t-vim.tex
index 4f1bd78b28..2ea93198c4 100644
--- a/macros/context/contrib/context-vim/tex/context/third/vim/t-vim.tex
+++ b/macros/context/contrib/context-vim/tex/context/third/vim/t-vim.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=t-vim,
-%D version=2020.04.29,
+%D version=2020.05.17,
%D title=\CONTEXT\ User Module,
%D subtitle=Vim syntax highlighting,
%D author=Aditya Mahajan,
@@ -9,7 +9,7 @@
%D email=adityam <at> ieee <dot> org,
%D license=Simplified BSD License]
-\writestatus{loading}{Vim syntax highlighting (ver: 2020.04.29)}
+\writestatus{loading}{Vim syntax highlighting (ver: 2020.05.17)}
\startmodule [vim]
\usemodule [filter] % loads module catcodes
@@ -39,74 +39,10 @@
\definesyntaxhighlighting[#1][\s!parent=\vimtyping@namespace#1]
\setupsyntaxhighlighting [#1][#2]
-
-
- \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}
- \edef\externalfilter@name{#1}
- \edef\currentexternalfilter{#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 \type{^M}
-\stoptexdefinition
-
-\starttexdefinition vimtyping@stop_raw
- % The last argument of the environment is \type{^M},
- % so we explicitly backup one line.
- \nobreak
- \vskip-\dimexpr\lineheight+\parskip\relax
- \nobreak
-
- \removeunwantedspaces
- \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}
- \edef\externalfilter@name{#1}
- \edef\currentexternalfilter{#1}
-
- \begingroup % to keep assignments local
- \setupvimtyping[#1][\c!name=,\c!location=\v!text,#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_indeed
-\stoptexdefinition
-
-\starttexdefinition vimtyping@inline_raw_indeed #1
- #1
- \externalfilter@attributes_stop
- \endgroup
\stoptexdefinition
% Mode to testing the dev version of 2context script.
-\doifmodeelse{vim-dev}
+\doifmodeelse{vim-dev,dev-vim}
{\def\vimtyping@script_name{2context.vim}}
{\doifmodeelse\s!mkiv
{\ctxlua{context.setvalue("vimtyping@script_name",resolvers.resolve("full:2context.vim"))}}
@@ -120,6 +56,7 @@
-X % dont connect to X server
-i NONE % dont use viminfo file
--noplugin % dont load plugins
+ --clean % dont load scada file (nvim)
-es % run in ex mode in silent
% -C % set compatible
-n % no swap file