Page 1 of 1

Parentheses Matching

Posted: Wed Oct 28, 2009 6:38 pm
by ScottishGent
I use TextPad for coding in multiple languages. One serious short coming of TextPad compared to other editors and IDEs that I use is the lack of Parantheses Matching (matching braces falls into this same catagory as well). Because of this deficiency I am always on the lookout for other text editors with the capabilities of TextPad as well as the parentheses matching.

In my opinion, this is a basic capability that any code editor should have and that the option you include (Ctrl+M) is not sufficient.

Posted: Thu Nov 05, 2009 3:31 pm
by aka_bigred
Parentheses matching is an enormous help when coding. The SQL query tool I use added it recently, and man is it nice! It really saves you from going blind trying to count when you have more than a couple parentheses in a massive statement.

Parentheses Matching

Posted: Tue Nov 17, 2009 2:03 am
by KnightOwl
TextPad has parentheses matching. It matches the following:
(), {}, [], and <>. Select one and press Ctrl+m to find it's match.

Also, there is a "Match Bracket" entry in the Search menu.

Open the Help Topics, and search for "match bracket" (with or without the " marks), for more info.

Re: Parentheses Matching

Posted: Tue Nov 17, 2009 1:24 pm
by ak47wong
KnightOwl wrote:TextPad has parentheses matching. It matches the following:
(), {}, [], and <>. Select one and press Ctrl+m to find it's match.
The original poster already stated "the option you include (Ctrl+M) is not sufficient" so he's well aware of this.

Posted: Wed Nov 18, 2009 11:39 pm
by KnightOwl
Missed that! :oops:

yep

Posted: Sat Nov 21, 2009 10:06 pm
by qkz73
Good idea.. but already done!
: )

Call this "Matching Parenthesis or Bracket **Highlighti

Posted: Fri Dec 11, 2009 3:11 pm
by dloritz
Several commenters/voters only skimmed the lead post and didn't understand the intent of this request.

Finding matching brackets with keystrokes is a drag.

We want to know what we're matching when we type it.

The way to know this is with bracket highlighting.

Re: Call this "Matching Parens or Bracket **Highlightin

Posted: Wed Mar 03, 2010 6:23 pm
by wtansi
... Or when you simply place your cursor on one of the brackets.

I agree completely. You be able to configure the TextPad so you don't need to *ask* for the match. It should assume you want to know where the matching bracket is.

I've been using Notepad++ a lot lately, since I discovered that it has this feature. It's certainly not as good an editor as TextPad, but this is a pretty critical feature, IMHO.

---------------------------------------------------------------------
dloritz wrote:Several commenters/voters only skimmed the lead post and didn't understand the intent of this request.

Finding matching brackets with keystrokes is a drag.

We want to know what we're matching when we type it.

The way to know this is with bracket highlighting.

Posted: Wed Apr 28, 2010 7:21 pm
by nfhamilton
I guess I have to disagree with most all of you. I find that editors that do this bracket highlighting to be intrusive and tends to disrupt my flow. I actually prefer the active method of having to type ^M.

If bracket highlighting does get added as a new feature, please allow me to disable it if I don't prefer it that way.

Perhaps ^M could be "improved" by highlighting both end points when asked.

My biggest beef is that I cannot add other elements to the list of "brackets". I code in Verilog, day-in and day-out. Verilog uses begin-end as its block delimiters. I would love to be able to add this to the elements to match against.

Posted: Wed May 05, 2010 9:28 pm
by peterbaldock
nfhamilton wrote:My biggest beef is that I cannot add other elements to the list of "brackets". I code in Verilog, day-in and day-out. Verilog uses begin-end as its block delimiters. I would love to be able to add this to the elements to match against.
Likewise - VHDL, Pascal/Delphi, VB, Forth and .asm for me. An editable list of matching Open/Close tokens (for each doc class?? - possibly and quite elegantly by extending the syntax highlighting algorithm) would be very powerful.

Bracket Matching

Posted: Thu Sep 15, 2011 2:29 pm
by cmiddleton
When I type a left parenthesis I would like the matching right parenthesis to be automatically inserted ahead of the cursor. Not sure if this is what ScottishGent means but if so, I would add my vote.

Re: Bracket Matching

Posted: Thu Sep 15, 2011 10:06 pm
by ak47wong
cmiddleton wrote:When I type a left parenthesis I would like the matching right parenthesis to be automatically inserted ahead of the cursor. Not sure if this is what ScottishGent means but if so, I would add my vote.
That's not what's usually meant by bracket matching, but you can do what you described by recording a macro and assigning it to the left parenthesis key:

1. Click Macros > Record.
2. Type "()".
3. Press Left.
4. Click Macros > Stop Recording.
5. Click Macros > Save.
6. In both File name and Display name, enter name like "Matched Parentheses" or similar.
7. Click Configure > Preferences.
8. Click Keyboard.
9. In Categories, click Macros.
10. In Commands, click Matched Parentheses.
11. Under Press new shortcut key, press (.
12. Click Assign.
13. Repeat the above other types of brackets you want, e.g. [], {}, <>.

Posted: Fri Sep 16, 2011 1:46 pm
by cmiddleton
Many thanks.