ConTEXt Group: Modules

Module: vim syntax highlighting

Id: vim
Title: vim syntax highlighting
Short: This module uses Vim editor's syntax files to syntax highlight verbatim code in ConTeXt
Description: 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 language, and get syntax highlighting for a new language. But writing such grammers 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.
Keywords: syntax-highlighting
Module maintainer: Aditya Mahajan
Type: Macro module
License: BSD License (simplified)
Version: 2020.06.29
Message: This is a major release that adds support for XML export. Many thanks to Christoph Hintermüller for the initial implementation and extensive brainstorming and testing. When export is enabled, e.g., using \setupbackend[export=yes] then \definevimtyping[CODE][syntax=..., alternative=colorscheme] \startCODE ... \stopextCODE is exported as ... And, \inlineCODE{...} is exported as ... Each line is wrapped inside a `...` and each syntax group is wrapped inside `...`. See the updated documentation for details. The module ships with a default CSS file which can be included as \setupexport[cssfile=\vimtypingcssfile] This CSS file tries to mimic the default PDF output. If you want to tweak the output then it is recommended that you copy the default CSS file and modify it as appropriate.
Date: 30-6-2020 07:03
File list: tex/context/third/vim/t-syntax-highlight.mkii