Wednesday, October 29, 2003

Editor pair highlighting

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.

1 comment:

  1. Hello,

    there are a editor with pair highlights:


    http://www.actionxp.com/editor/help


    sample:

    http://www.actionxp.com/editor/help/delphi2htm.htm


    http://www.actionxp.com/editor/help/c.htm


    you can setup [],{},(),Begin/End(or what u like), as pair key.

    ReplyDelete

Please keep your comments related to the post on which you are commenting. No spam, personal attacks, or general nastiness. I will be watching and will delete comments I find irrelevant, offensive and unnecessary.