'start with @ to define a variable' ?

Discuss syntax highlighting or submit new syntax files.
Post Reply
NTB
Posts: 9
Joined: 08 May 2010 15:40

'start with @ to define a variable' ?

Post by NTB »

Just curious about this: In the syntax editor, when I go to add a new keyword group, the dialogue box that comes up says
Enter a name. Start with a @ to define a variable, E.g. @var.
What is it for? does the '@' symbol tell the editor to do something special? I've looked through the help documentation, but I didn't see anything on this...wouldn't surprise me if I missed something, though :P

Nathan
User avatar
Rickard Johansson
Site Admin
Posts: 6628
Joined: 19 Jul 2006 14:29

Post by Rickard Johansson »

Variables should be used with auto completion only. I'll change the dialog text when adding keywords.

Auto completion lists are often repeated between tags or classes. Variables are then used to simplify the process of adding auto completion data in the syntax files.

I'll add some information in the help. Thanks!
NTB
Posts: 9
Joined: 08 May 2010 15:40

Post by NTB »

Do any of the standard syntax definitions use this? Just wondering - I'd like to see an example of how to set this up.

Nathan
User avatar
Rickard Johansson
Site Admin
Posts: 6628
Joined: 19 Jul 2006 14:29

Post by Rickard Johansson »

No. The feature was added after most syntax files were already created.

I would like to re-write the HTML syntax file using variables one day...
Post Reply