Show matching brackets

Ideas for new features

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

How important is it to you, to have this feature implemented into future versions of TextPad?

Important, even if the size/efficiency of TextPad increases/degrades
63
54%
Somewhat important
40
34%
I'm okay either way
8
7%
Somewhat unimportant
3
3%
Unimportant, even if the size/efficiency of TextPad remains unaffected
2
2%
 
Total votes: 116

zainka
Posts: 33
Joined: Tue Apr 29, 2003 6:40 am

Show matching brackets

Post by zainka »

NOTE: This msg was originaly sent as an email to Textpad suport, but are listed here for other to judge the utilitarian value of my sugestion.

My company is currently using Textpad as our IDE for developing C-code.
We are quite satisfyed with TP, but there is some features that we miss
and hope that will be added to a future release.

1: To be able to see matching brackets

2: It would also be useful if it was possible to set up TP to auto
aligning matching brackets. But it must be possible to turn this feature
off.

Regards
Vidar[/quote]
User avatar
jeffy
Posts: 323
Joined: Mon Mar 03, 2003 9:04 am
Location: Philadelphia

Post by jeffy »

I am voting positively for part one of this suggestion. I don't find the "alignment" part of this suggestion terribly important.
zainka
Posts: 33
Joined: Tue Apr 29, 2003 6:40 am

Post by zainka »

Part 1 is actually already implemented by use of Ctrl+M when standing next to a bracket of any cind. :roll: I didn't know that the time I posted my sugestions.

Part 2 is more lik "nice to have" when you are writing large amount of code in big files. Then you sometimes want to remove part of the code, wich might generates a huge amount of "clean up" work. Then it is nice to have such a function to do the most of the work, aligning code blocks that now, after removing code, belongs <b>to</b> the same level,,,, <b>at</b> the same level.

I have seen this function work prety well in JavaConsole. I supose it might be possible to make a macro to do this, i don't know.

But Part 1 is the important one, and as mentioned, Ctrl+M do the little thing, so i guess woting Part1 isn't quite necessary anymore.
User avatar
jeffy
Posts: 323
Joined: Mon Mar 03, 2003 9:04 am
Location: Philadelphia

Post by jeffy »

zainka wrote:Part 1 is actually already implemented by use of Ctrl+M when standing next to a bracket of any cind. :roll: I didn't know that the time I posted my sugestions.
Sure Ctrl+M is implemented. But that takes you to that bracket. What I want is to just see matching brackets automatically glow, just for a second, when I type the corresponding close bracket. I also want to be able to configure what bracket characters are. Finally, there should also be HTML brackets, so when I type a </B>, the corresponding <B> glows briefly.

:' )
zainka
Posts: 33
Joined: Tue Apr 29, 2003 6:40 am

Post by zainka »

Yes... I completly agree with you. Both "glowing" brackets and visualising of HTML "brackets" , Hmmm... I like that.

Regards
Vidar

PS! I use the opportunity to send my best wishes to the Prinsess of Norway, who youst got her self a little daughter last night. Congratulations! :P Her name is Maud Angelica
Ceranith
Posts: 7
Joined: Mon Mar 10, 2003 6:31 am

Post by Ceranith »

zainka wrote:Yes... I completly agree with you. Both "glowing" brackets and visualising of HTML "brackets" , Hmmm... I like that.
Me too :)
Revenant
Posts: 1
Joined: Thu Jun 05, 2003 10:13 am

Post by Revenant »

Following on from that, how about being able to choose BEGIN and END as brackets (i.e. for SQL, Pascal etc)?
contemptus
Posts: 8
Joined: Wed Jun 11, 2003 8:28 am

ctrl+m

Post by contemptus »

I have used this feature, but it would be nice to see some sort of highligth of the matching bracket. I found this feature at JCreator LE (free at www.jcreator.com) and I enjoyed it.
I hope to see it at TP also.
maynard
Posts: 2
Joined: Tue Jul 01, 2003 10:55 pm
Location: Yoga high street
Contact:

Cute idea, especially when HTML tags are covered,

Post by maynard »

but what happens when the matching delimiter is off the screen, in a L-O-O-NG C function, for example?
JonK
Posts: 4
Joined: Wed Jul 16, 2003 9:31 am

Work with it....

Post by JonK »

Well, you could use this as a warning light - if you can't see the matching bracket glow then it's probably time to refactor your code :wink:

This doesn't work quite so well for <html> </html> tag pairs mind...
Tyriel
Posts: 25
Joined: Wed Jul 16, 2003 6:20 pm

Post by Tyriel »

I agree, the "find matching bracket" feature is nice but not quite sufficient. There should be a config option such that it will automatically highlight matching brackets whenever a Close one is selected (just the one character is selected) or typed.
~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~
-Steve Estes (Tyriel)
AIM: EnderW271
ICQ: 6854118
Email: destes[at]ix.netcom.com
User avatar
webmasta
Posts: 169
Joined: Mon Jul 28, 2003 8:16 pm
Location: Toronto

Post by webmasta »

heres how i solved that glowing issue....

first thing i did was re-assign the kb shortcut//
matchBracket to ctrl+, (comma)
matchBracketExtend to ctrl+. (period) - ctrl+shift+M is for octopuss

now clik within ure block and keep pressing ctrl+, (comma)
the two brackets will glow with whatever is ure text select color .. blue in my case, if the two brackets are not within the window the page will scroll up/down

to select all between the brackets, including the brackets , press ctrl+. (period)

hope this helps///
melvers
Posts: 26
Joined: Tue Aug 05, 2003 1:52 pm

I agree with the both requests

Post by melvers »

This is one of the few features the Visual Studio provides that I wish TextPad would support as well. Using a workaround, such as the one mentioned, is inconvenient at best. You want to see the indication automatically while you are typing.
User avatar
webmasta
Posts: 169
Joined: Mon Jul 28, 2003 8:16 pm
Location: Toronto

Post by webmasta »

Yeah, definetly seeing the brackets glow as you type would be best, and if you're accustomed to it then anything less will obviously be inconvenient.

Necessity was the mother of invention here, TP doesnt have that feature so I made my own with the tools I had.

Then again, with good programming practise, you can develop your own style of where you put your brackets so the enclosing block is visually set apart even with nested blocks.

As soon as I roll a block, I hit the enter key two times and tab in to line up the closing bracket with the opening one, but that's just me.

TP rocks.
ebdalqui
Posts: 3
Joined: Thu Jun 12, 2003 3:53 pm

Post by ebdalqui »

The best implementation of this feature I have seen is in Oracle jDeveloper.

Some examples would probably show it the best (The | represents the cursor):

public void function ()
{
|}

Both curly brackets would have a light blue background.

---------

public void funtion ()
{
t.parseInt(a.toString()|);
}

the () pair at the end of toString would have the light blue background, the () pair for the parseInt function would have a dark blue background.

---------

public void funtion ()
{
t.parseInt(a.toString())|);
}

the () pair for the parseInt function would have a light blue background, the extra ) would have a red background.



Using this system you only need 3 colors. The two for either side of the cursor and the warning color for an unmatched bracket. That feature in jDev is one of the most usefull in the product.
Post Reply