PDA

View Full Version : Syntax coloring for VBA?


PIMfan
08-05-2014, 01:31 PM
Is there any way to have UR show syntax coloring for VBA code? I don't see it listed in the set of supported languages for captured code snippets....

kinook
08-05-2014, 08:51 PM
UR will syntax color VBScript code in .vb and .vbs files. For other file extensions, you would need to add the extensions to this line in Editor\Schemas\_VBScript.schclass in the UR installation folder:

lexClass:
parent:file = <*.vb|*.vbs|*.otherext1|*.otherext2>

PIMfan
08-07-2014, 03:22 PM
I made the above listed changes and see the code colored in the editor window. However I don't see - unlike other languages like Javascript - code blocks showing the expand/collapse control. Note the difference in the For Next loops in VBA vs. JS....Can this be fixed? Some of my code blocks are big and the collapse button helps alot....:

kinook
08-08-2014, 06:01 AM
Unfortunately, code blocks in VBScript aren't very well defined (unlike { } for Javascript), so the parser of the editing component used by UR can't identify blocks in VBScript code.