Editor pair highlighting

Posted by on in Blogs

Since one of my BorCon talks has been canceled, I will begin to post some of the content that was planned here. To get things started, here's one item that applies to C#Builder (and the upcoming Delphi 8, codenamed "Octane").

Modifying which character pairs the IDE highlights:

Insert standard disclaimer concerning editing your registry, here

Open RegEdit and go to the following key:

HKCUSoftwareBorlandBDS1.0EditorSource OptionsBorland.EditOptions.XXXXPair Table

Under the above key there are string entries formatted as comma separated values, for instance the "(* *)" pair in the "Borland.EditOptions.PascalPair Table" key is represented as:

0,1,2,(*,*)

The meanings of these values are, in order:

Nestable = 0 - No, 1 - Yes, 2 - Maybe
ImpliedDir = 0 - No, 1 - Yes
CharCount = 1 or 2 only
Starting string = 1 or 2 char string
Ending string = 1 or 2 char string

So to create non-nestable, implied direction pair for, say <% and %> it would look like this:

0,1,2,<%,%>

So if you don't want to highlight the quote characters since they have no implied direction and will often highlight strangely, delete the 0,0,1,',' and 0,0,1,"," entries and those pairs won't display as match characters. Note that this will also disable the Ctrl-Q+[ and Ctrl-Q+] functionality for those characters.

About
Gold User, Rank: 84, Points: 11
Comments are not available for public users. Please login first to view / add comments.