Parentheses Matching

Ideas for new features

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply

Include parantheses matching in TextPad.

Yes
26
90%
No
3
10%
 
Total votes: 29

ScottishGent
Posts: 1
Joined: Wed Oct 28, 2009 6:26 pm

Parentheses Matching

Post 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.
aka_bigred
Posts: 6
Joined: Wed Nov 04, 2009 3:37 pm

Post 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.
User avatar
KnightOwl
Posts: 2
Joined: Tue Nov 17, 2009 12:19 am

Parentheses Matching

Post 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.
jc
ak47wong
Posts: 703
Joined: Tue Aug 12, 2003 9:37 am
Location: Sydney, Australia

Re: Parentheses Matching

Post 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.
User avatar
KnightOwl
Posts: 2
Joined: Tue Nov 17, 2009 12:19 am

Post by KnightOwl »

Missed that! :oops:
jc
qkz73
Posts: 33
Joined: Thu Jul 22, 2004 9:15 pm

yep

Post by qkz73 »

Good idea.. but already done!
: )
- QKZ -
dloritz
Posts: 3
Joined: Fri Dec 11, 2009 2:56 pm
Location: Dayton, Ohio

Call this "Matching Parenthesis or Bracket **Highlighti

Post 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.
wtansi
Posts: 1
Joined: Mon Feb 01, 2010 2:51 pm

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

Post 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.
nfhamilton
Posts: 4
Joined: Fri Feb 06, 2004 5:03 pm
Location: Kanata, Ontario, Canada
Contact:

Post 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.
peterbaldock
Posts: 6
Joined: Thu Mar 05, 2009 12:28 pm
Location: Hungerford, UK
Contact:

Post 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.
Peter Baldock, Douglas Instruments
cmiddleton
Posts: 2
Joined: Thu Sep 15, 2011 2:19 pm

Bracket Matching

Post 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.
ak47wong
Posts: 703
Joined: Tue Aug 12, 2003 9:37 am
Location: Sydney, Australia

Re: Bracket Matching

Post 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. [], {}, <>.
cmiddleton
Posts: 2
Joined: Thu Sep 15, 2011 2:19 pm

Post by cmiddleton »

Many thanks.
Post Reply