summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-12-05 23:59:56 +0000
committerKarl Berry <karl@freefriends.org>2011-12-05 23:59:56 +0000
commit419179e1e5abfb701e3f712c16931717c8a4d5b6 (patch)
tree084c870c90c437d54fe17ed54bf11f6ee38ecf61 /Master
parent91f1c628adc2baced568accedfe8cfc08239ae22 (diff)
context-vim (5dec11)
git-svn-id: svn://tug.org/texlive/trunk@24773 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/context/third/vim/vim.txt6
-rw-r--r--Master/texmf-dist/tex/context/third/vim/t-syntax-groups.tex11
-rw-r--r--Master/texmf-dist/tex/context/third/vim/t-syntax-highlight.tex16
-rw-r--r--Master/texmf-dist/tex/context/third/vim/t-vim.tex8
4 files changed, 27 insertions, 14 deletions
diff --git a/Master/texmf-dist/doc/context/third/vim/vim.txt b/Master/texmf-dist/doc/context/third/vim/vim.txt
index a7fc9128f10..b758e998473 100644
--- a/Master/texmf-dist/doc/context/third/vim/vim.txt
+++ b/Master/texmf-dist/doc/context/third/vim/vim.txt
@@ -4,9 +4,9 @@ The vim module
This module highlights code snippets using vim as a syntax
highlighter. Such a task may appear pointless at first glance. After all,
ConTeXt provides excellent syntax highlighting features for TeX, Metapost, XML,
-and a few other langauges. And in MkIV, you can specify the grammer to parse a
+and a few other languages. And in MkIV, you can specify the grammar to parse a
language, and get syntax highlighting for a new language. But writing such
-grammers is difficult. More importantly, why reinvent the wheel? Most
+grammars is difficult. More importantly, why reinvent the wheel? Most
editors, and many other syntax highlighting programs, already syntax highlight
many programming languages. Why not just leverage these external programs to
generate syntax highlighting? This module does exactly that.
@@ -200,7 +200,7 @@ The default color scheme is `pscolor`.
Line numbering
---------------
-To eanble line numbering for a particular snippet, use:
+To enable line numbering for a particular snippet, use:
\start<vimtyping>[numbering=yes]
...
diff --git a/Master/texmf-dist/tex/context/third/vim/t-syntax-groups.tex b/Master/texmf-dist/tex/context/third/vim/t-syntax-groups.tex
index d07a9f80686..ae1f459b8fa 100644
--- a/Master/texmf-dist/tex/context/third/vim/t-syntax-groups.tex
+++ b/Master/texmf-dist/tex/context/third/vim/t-syntax-groups.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=t-syntax-groups,
-%D version=2011.09.03,
+%D version=2011.10.20,
%D title=\CONTEXT\ User Module,
%D subtitle=Syntax highlighting support,
%D author=Aditya Mahajan,
@@ -9,9 +9,7 @@
%D email=adityam <at> ieee <dot> org,
%D license=Simplified BSD License]
-\writestatus{loading}{Syntax highlighting groups (ver: 2011.09.03)}
-
-\tracingmacros=1
+\writestatus{loading}{Syntax highlighting groups (ver: 2011.10.20)}
% Colors are specified in hex; in MkII the hex mode needs to be activated.
\doifmode\s!mkii
@@ -28,6 +26,9 @@
\def\syntaxgroup::namespace {@@@@\syntaxgroup::id}
\def\syntaxgroup::name {}
+\edef\t!syntaxgroup {\syntaxgroup::id}
+
+
\installparameterhandler \syntaxgroup::namespace \syntaxgroup::id
\installsetuphandler \syntaxgroup::namespace \syntaxgroup::id
@@ -95,12 +96,14 @@
\iftracesyntaxgroups
\syntaxgroup::show_values
\fi
+ \doifmode{\s!mkiv}{\dostarttagged\t!syntaxgroup{#1}}
\syntaxgroupparameter\c!command
{
\externalfilter::attributes_start\syntaxgroup::id\c!style\c!color
#2
\externalfilter::attributes_stop
}
+ \doifmode{\s!mkiv}{\dostoptagged}
\endgroup
\syntaxgroupparameter\c!after
\stoptexdefinition
diff --git a/Master/texmf-dist/tex/context/third/vim/t-syntax-highlight.tex b/Master/texmf-dist/tex/context/third/vim/t-syntax-highlight.tex
index 2cfa6ae6804..09c2ef8e0d0 100644
--- a/Master/texmf-dist/tex/context/third/vim/t-syntax-highlight.tex
+++ b/Master/texmf-dist/tex/context/third/vim/t-syntax-highlight.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=t-syntax-highlight,
-%D version=2011.09.03,
+%D version=2011.10.14,
%D title=\CONTEXT\ User Module,
%D subtitle=Code syntax highlighting,
%D author=Aditya Mahajan,
@@ -9,7 +9,7 @@
%D email=adityam <at> ieee <dot> org,
%D license=Simplified BSD License]
-\writestatus{loading}{Code syntax highlighting (ver: 2011.09.03)}
+\writestatus{loading}{Code syntax highlighting (ver: 2011.10.14)}
\startmodule [syntax-highlight]
\usemodule [syntax-groups]
@@ -43,6 +43,8 @@
\def\syntaxhighlighting::namespace {@@@@\syntaxhighlighting::id}
\def\syntaxhighlighting::name {}
+\edef\t!syntaxhighlighting {\syntaxhighlighting::id}
+
\installparameterhandler \syntaxhighlighting::namespace \syntaxhighlighting::id
\installsetuphandler \syntaxhighlighting::namespace \syntaxhighlighting::id
@@ -150,6 +152,13 @@
[\syntaxhighlighting::name]
[\c!continue=\externalfilterparameter{\c!number\c!continue}]}
\stoptexdefinition
+
+\starttexdefinition syntaxhighlighting::linenumbering_stop
+ \dostoptagged
+ \doifinset{\externalfilterparameter\c!numbering}\syntaxhighlighting::yes
+ {\stoplinenumbering}
+\stoptexdefinition
+
\stopmode
\startmode [\s!mkii]
@@ -159,12 +168,12 @@
{\startlinenumbering[\v!continue]}
{\startlinenumbering}}
\stoptexdefinition
-\stopmode
\starttexdefinition syntaxhighlighting::linenumbering_stop
\doifinset{\externalfilterparameter\c!numbering}\syntaxhighlighting::yes
{\stoplinenumbering}
\stoptexdefinition
+\stopmode
\setupsyntaxhighlighting
[\c!tab=4,
@@ -265,4 +274,3 @@
\protectmodulecatcodes
\stopmodule
-
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 5810966eb31..2c6fd86d241 100644
--- a/Master/texmf-dist/tex/context/third/vim/t-vim.tex
+++ b/Master/texmf-dist/tex/context/third/vim/t-vim.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=t-vim,
-%D version=2011.09.03,
+%D version=2011.12.04,
%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: 2011.09.03)}
+\writestatus{loading}{Vim syntax highlighting (ver: 2011.12.04)}
\startmodule [vim]
\usemodule [filter]
@@ -100,7 +100,9 @@
% Mode to testing the dev version of 2context script.
\doifmodeelse{vim-dev}
{\def\vimtyping::script_name{2context.vim}}
- {\def\vimtyping::script_name{kpse:2context.vim}}
+ {\doifmode\s!mkiv
+ {\ctxlua{context.setvalue("vimtyping::script_name",resolvers.resolve("full:2context.vim"))}}
+ {\def\vimtyping::script_name{kpse:2context.vim}}}
\def\vimtyping::filter_command
{vim -u \vimrcfilename\space % read global config file