From 8053772e54fc2f47ea92574591d7757c465a5280 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 1 May 2018 17:33:54 +0000 Subject: context-vim (18apr18) git-svn-id: svn://tug.org/texlive/trunk@47531 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/context/third/vim/VERSION | 2 +- Master/texmf-dist/doc/context/third/vim/vim.txt | 27 +++++++++++----------- .../tex/context/third/vim/t-syntax-highlight.mkiv | 22 ++++++++++-------- Master/texmf-dist/tex/context/third/vim/t-vim.tex | 6 ++--- 4 files changed, 29 insertions(+), 28 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/context/third/vim/VERSION b/Master/texmf-dist/doc/context/third/vim/VERSION index 6c676b7a0c1..2ccc03a5fa1 100644 --- a/Master/texmf-dist/doc/context/third/vim/VERSION +++ b/Master/texmf-dist/doc/context/third/vim/VERSION @@ -1 +1 @@ -2017.07.29 +2018.04.17 diff --git a/Master/texmf-dist/doc/context/third/vim/vim.txt b/Master/texmf-dist/doc/context/third/vim/vim.txt index 8e45d0f8cb6..801d1fb34c7 100644 --- a/Master/texmf-dist/doc/context/third/vim/vim.txt +++ b/Master/texmf-dist/doc/context/third/vim/vim.txt @@ -322,36 +322,35 @@ indent the TeX code. For example: \stopruby \stopitemize -Although, the source code is easy to read, the output will not be. This is -because, unlike regular TeX, `\start` ... `\stop` -environment does not ignore white space. So, the output is the same as +By default, the leading whitespace is stripped so that the output is the same +as \startitemize \item A hello world example in C \startC - #include + #include - int main() - { - printf("Hello World") - } + int main() + { + printf("Hello World") + } \stopC \item A hello world example in ruby \startruby - puts "Hello World" + puts "Hello World" \stopruby \stopitemize -So, all the code snippets are indented by nine space. To avoid this behavior, -set + +If you want to disable this, set \definevimtyping [...] [... - strip=yes, + strip=no, ...] -The default value of `strip` is `no`. +The default value of `strip` is ψ`yes`. Adding left margin ------------------ @@ -590,7 +589,7 @@ ConTeXt has two ways of indicating binary options: The core commands freely switch between the two. In some cases, `option=yes` has a different meaning than `option=on`. To avoid confusion, I have made these synonyms. Thus, whenever the documentation says `option=yes`, you may use -`option=on`. One less thing to worry about! +`option=on`. And vice-versa. One less thing to worry about! A bit of a history ------------------ diff --git a/Master/texmf-dist/tex/context/third/vim/t-syntax-highlight.mkiv b/Master/texmf-dist/tex/context/third/vim/t-syntax-highlight.mkiv index b15ca34a5b3..26f7be1a7f5 100644 --- a/Master/texmf-dist/tex/context/third/vim/t-syntax-highlight.mkiv +++ b/Master/texmf-dist/tex/context/third/vim/t-syntax-highlight.mkiv @@ -1,6 +1,6 @@ %D \module %D [ file=t-syntax-highlight, -%D version=2017.07.29, +%D version=2018.04.16, %D title=\CONTEXT\ User Module, %D subtitle=Code syntax highlighting, %D author=Aditya Mahajan, @@ -9,7 +9,7 @@ %D email=adityam ieee org, %D license=Simplified BSD License] -\writestatus{loading}{Code syntax highlighting (ver: 2017.07.29)} +\writestatus{loading}{Code syntax highlighting (ver: 2018.04.16)} \startmodule [syntax-highlight] \usemodule [syntax-groups] @@ -96,8 +96,10 @@ \doifnotinset{\externalfilterparameter\c!option}{\v!hyphenated} {\language\minusone}% - \setcatcodetable\externalfilter@minimal_catcodes - \expandafter\def\activeendoflinetoken{\strut\par} + \def\obeyedline{\strut\par} + \setcatcodetable\externalfilter@minimal_catcodes% + \letcharcode\endoflineasciicode\obeyedline + \letcharcode\spaceasciicode\obeyedspace \activatespacehandler{\????syntaxhighlighting\externalfilterparameter\c!space} \raggedright \stopsetups @@ -204,19 +206,19 @@ % Visible space \installspacemethod {\????syntaxhighlighting\v!on} - {\obeyspaces - \unexpanded\def\obeyedspace + {\unexpanded\def\obeyedspace {\mathortext\normalspace {\syntaxhighlighting@split\zeropoint\relax \hbox{\normalcontrolspace}% - \syntaxhighlighting@split\zeropoint\relax}}} + \syntaxhighlighting@split\zeropoint\relax}} + \letcharcode\spaceasciicode\obeyedspace} % Invisible space \installspacemethod {\????syntaxhighlighting\v!off} - {\obeyspaces - \unexpanded\def\obeyedspace + {\unexpanded\def\obeyedspace {\mathortext\normalspace - {\syntaxhighlighting@split\interwordspace\relax}}} + {\syntaxhighlighting@split\interwordspace\relax}} + \letcharcode\spaceasciicode\obeyedspace} % Default \installspacemethod {\????syntaxhighlighting} 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 829999a933b..3cd83cdb2f8 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=2017.07.29, +%D version=2018.04.17, %D title=\CONTEXT\ User Module, %D subtitle=Vim syntax highlighting, %D author=Aditya Mahajan, @@ -9,7 +9,7 @@ %D email=adityam ieee org, %D license=Simplified BSD License] -\writestatus{loading}{Vim syntax highlighting (ver: 2017.07.29)} +\writestatus{loading}{Vim syntax highlighting (ver: 2018.04.17)} \startmodule [vim] \usemodule [filter] % loads module catcodes @@ -162,7 +162,7 @@ % \c!after=, % \c!style=\tttf, % \c!color=, - \c!strip=\v!off, + \c!strip=\v!yes, \c!escape=\v!off, % \c!highlight=, % \c!highlightcolor=lightgray, -- cgit v1.2.3