From b273a879fbed76480fb7368ad555010024f3e411 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 30 Apr 2020 03:01:50 +0000 Subject: CTAN sync 202004300301 --- macros/context/contrib/context-vim/VERSION | 2 +- .../context-vim/doc/context/third/vim/vim.txt | 26 +++++++++++++++++++++- .../context-vim/tex/context/third/vim/t-vim.tex | 16 +++++++------ 3 files changed, 35 insertions(+), 9 deletions(-) (limited to 'macros/context') diff --git a/macros/context/contrib/context-vim/VERSION b/macros/context/contrib/context-vim/VERSION index 9e6f07d186..cf132c65ea 100644 --- a/macros/context/contrib/context-vim/VERSION +++ b/macros/context/contrib/context-vim/VERSION @@ -1 +1 @@ -2020.04.25 +2020.04.29 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 11c17cf59e..43d55333c4 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 @@ -543,7 +543,9 @@ after the comma in the options to `\startframedtext` will result in an error. Clearly, `/BTEX ... /ETEX` is not a valid syntax in any language, so if these tags are used outside of a comment region (as is the case in the above example), the code will not compile. So, if the code also needs to run, then -these annotations have to be restricted to the comment region of the code. +these annotations have to be restricted to the comment region of the code or +the output typeset by ConTeXt has to be manually tested for correctness prior +to the release of your document. Although, in practice, the use of both escape mechanisms is restricted to comments, the two mechanism have subtle differences. When using @@ -677,6 +679,28 @@ 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`. And vice-versa. One less thing to worry about! +Name (and location) of the VIM executable +----------------------------------------- + +By default, the `t-vim` module calls the program `vim` to do syntax +highlighting. If the `vim` program is not in the `$PATH`, the `vimcommand` +option may be used to specify the compete path of `vim`: + + \setupvimtyping[vimcommand=/path/to/vim] + +This option may also be used to call [Neovim] instead of `vim` to do syntax +highlighting, by either using + + \setupvimtyping[vimcommand=nvim] + +or, if `nvim` is not in the `$PATH`, using + + \setupvimtyping[vimcommand=/path/to/nvim] + +[Neovim]: https://neovim.io/ + +As of 2020.04.29, `nvim` is about 10% faster than `vim`. + A bit of a history ------------------ 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 eb0adbfe7b..4f1bd78b28 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.25, +%D version=2020.04.29, %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: 2020.04.25)} +\writestatus{loading}{Vim syntax highlighting (ver: 2020.04.29)} \startmodule [vim] \usemodule [filter] % loads module catcodes @@ -17,6 +17,7 @@ \startinterface all \setinterfaceconstant {vimrc} {vimrc} + \setinterfaceconstant {vimcommand} {vim\c!command} \stopinterface \unprotectmodulecatcodes @@ -112,15 +113,15 @@ {\def\vimtyping@script_name{kpse:2context.vim}}} \def\vimtyping@filter_command - {vim -u \vimrc_filename\space % read global config file + {\externalfilterparameter\c!vimcommand\space + -u \vimrc_filename\space % read global config file % --startuptime log % -V3log -X % dont connect to X server -i NONE % dont use viminfo file --noplugin % dont load plugins - -e % run in ex mode - -s % silent - -C % set compatible + -es % run in ex mode in silent + % -C % set compatible -n % no swap file -c "syntax manual" % don't load filetype detection -c "set syntax=\externalfilterparameter\c!syntax" % @@ -157,7 +158,8 @@ \setvalue{\vimtyping@id-\c!escape-\v!yes}{1} \setupvimtyping - [% \c!tab=4, + [\c!vimcommand={vim}, + % \c!tab=4, % \c!start=1, % \c!stop=0, % \c!syntax=context, -- cgit v1.2.3