Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to have your delimiter double and single, too

In my custom Notepad++ user-defined language (UDL) for AutoHotkey, I am trying to fix an issue where the colours for variables don't display correctly.

In the UDL configurator, I have, under Operators & Delimiters, specified Delimiter 1 Style for

Open: %
Escape:
Close: %

But I need to fix it so that if there is a % followed by a space that the colouring for Delimiter 1 is not continued to the next line.

How can I do that?

like image 467
bgmCoder Avatar asked Nov 22 '13 17:11

bgmCoder


1 Answers

Here is the solution:

In the UDL documentation it says you can use a special code within the styler options to indicate either / or.

Thus, for your variable delimiter for the % sign, you want to do this:

open:  %
escape:
close: ((% EOL))

This will provide you with proper colouring in both situations.

Here is what it looks like in the UDL file:

<Keywords name="Delimiters">00% 01 02((% EOL)) 03&quot; 04 05&quot; 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>

Here is my new AutoHotkey syntax file with working % variable markers.

like image 195
bgmCoder Avatar answered Oct 14 '22 07:10

bgmCoder