Notepad++ expand/collapse code blocks for the user defined languages

2.2k views Asked by At

I am trying to add the syntax plugin for the TAL (Transaction Application Language) in Notepad++

I have downloaded the xml file for TAL from http://docs.notepad-plus-plus.org/index.php/User_Defined_Language_Files and kept in C:\Users[user]\AppData\Roaming\Notepad++ folder.

After the above step, I have restarted Notepad++ and I could see all the keywords are getting highlighted correctly but the expand/collapse of the blocks are not working as expected.

The downloaded xml file has the following lines for the code expand/collapse.

    <Keywords name="Folders in code1, open">BEGIN ?nolist</Keywords>
    <Keywords name="Folders in code1, middle"></Keywords>
    <Keywords name="Folders in code1, close">END; ?list</Keywords>

As per the above xml statement the block ends at END; (Semicolon)

The syntax for the conditional statements will be as below,

IF CONDITION1 THEN
   BEGIN
     statements;
   END;

IF CONDITION2 THEN
   BEGIN
     statements;
   END  -- no semicolon
ELSE IF CONDITION3 THEN
   BEGIN
      statements;
   END;

The expand/collapse is working good for the first syntax example. In the second syntax the first BEGIN ending at END;(semicolon) where as it should end at END (No semicolon)

I have modified the third line to

<Keywords name="Folders in code1, close">END ?list</Keywords>

and I started seeing the block ending at the partial words as below.

IF CONDITION4 THEN
   BEGIN
     statements;
     SENDTOSERVER();  -- ending here as END is present
     statements;
END;

Changing the third line to any of below line also resulted the same.

<Keywords name="Folders in code1, close">END END; ?list</Keywords>
<Keywords name="Folders in code1, close">"END" "END;"?list</Keywords>

How can I match ending blocks to either END or END; (complete word). I am using the notepad++ version 7.2.2

0

There are 0 answers