[NTG-context] Custom syntax highlighting

Nicola nvitacolonna at gmail.com
Wed Mar 2 12:20:59 CET 2016


On 2016-03-02 11:06:34 +0000, Nicola said:

> On 2016-03-02 02:14:33 +0000, Aditya Mahajan said:
> 
>> On Tue, 1 Mar 2016, Nicola wrote:
>> 
>>> On 2016-03-01 15:35:07 +0000, Aditya Mahajan said:
>>> 
>>>> On Tue, 1 Mar 2016, Nicola wrote:
>>>> 
>>>>> I'm using the latest beta, and I need syntax coloring for SQL
>>>>> (PostgreSQL variant). According to the wiki, there is no SQL
>>>>> syntax coloring available for MKIV yet, but I'd be happy to
>>>>> be wrong :)
>>>> 
>>>> You can use the vim module:
>>>> 
>>>> https://github.com/adityam/filter/blob/master/vim-README.md
> 
> I have a relatively minor problem with linked highlight groups.
> As far as I can see, the module resolves linked groups so that,
> for example, if String links to Constant, then the generated code
> for 'a string' will be something like \SYN[Constant]{'a string'},
> rather than \SYN[String]{'a string'}. In my specific case, strings
> use the sqlString group, which links by default to String, which in
> turn links to Constant.
> 
> Is there a way to decouple linked highlight groups, so that, for
> example, I may distinguish Constant from String? I have already
> tried to put commands like
> 
> hi! clear sqlString
> hi! link String NONE
> etc...
> 
> in the vimrc block, to no avail.

Ok, I have found it:

hi! link sqlString NONE

With that, I get \SYN[sqlString]{'a string'}, as expected.

Nicola




More information about the ntg-context mailing list