[NTG-context] Custom color schemes in t-vim

Nicola nvitacolonna at gmail.com
Sat May 16 21:24:18 CEST 2020

On 2020-05-16, Aditya Mahajan <adityam at umich.edu> wrote:
> On Sat, 16 May 2020, Aditya Mahajan wrote:

> Moreover, if you comment line line 126 of `2context.vim`
>      "let s:id      = synIDtrans (s:id)
> [If you make a local copy of 2context.vim, then you need to run the
> file with `--mode=dev-vim` to ensure that the local copy is used]
> Then the ruby example generates the following file:
> \SYNBOL{}\SYN[rubyComment]{# Ruby program listing}\SYNEOL{}
> \SYNBOL{}\SYN[rubyDefine]{def}\SYN[rubyMethodBlock]{ }\SYN[rubyMethodName]{foobar}\SYNEOL{}
> \SYNBOL{}\SYN[rubyMethodBlock]{  print(}\SYN[rubyStringDelimiter]{"}\SYN[rubyString]{Hello World}\SYN[rubyStringDelimiter]{"}\SYN[rubyMethodBlock]{)}\SYNEOL{}
> \SYNBOL{}\SYN[rubyDefine]{end}\SYNEOL{}
> So, if you are willing to define wrappers for all ruby syntax blocks,
> then I can provide a configuration option so that `2context` does not
> apply that line.

That might provide a finer control over the highlighting, but the main
issue here seems to be that the generated file has Identifier instead of
Function, Special instead of Delimiter and Constant instead of String.
Looking at 2context.vim, AFAICS s:id_name seems computed correctly.
Maybe, the script does not set the appropriate filetype?


More information about the ntg-context mailing list