Page 1 of 2

Show matching brackets

Posted: Tue Apr 29, 2003 6:50 am
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]

Posted: Tue Apr 29, 2003 11:30 am
by jeffy
I am voting positively for part one of this suggestion. I don't find the "alignment" part of this suggestion terribly important.

Posted: Tue Apr 29, 2003 11:52 am
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.

Posted: Tue Apr 29, 2003 12:21 pm
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.

:' )

Posted: Wed Apr 30, 2003 6:51 am
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

Posted: Wed Apr 30, 2003 10:43 pm
by Ceranith
zainka wrote:Yes... I completly agree with you. Both "glowing" brackets and visualising of HTML "brackets" , Hmmm... I like that.
Me too :)

Posted: Thu Jun 05, 2003 10:16 am
by Revenant
Following on from that, how about being able to choose BEGIN and END as brackets (i.e. for SQL, Pascal etc)?

ctrl+m

Posted: Wed Jun 11, 2003 2:28 pm
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.

Cute idea, especially when HTML tags are covered,

Posted: Tue Jul 01, 2003 11:08 pm
by maynard
but what happens when the matching delimiter is off the screen, in a L-O-O-NG C function, for example?

Work with it....

Posted: Wed Jul 16, 2003 9:40 am
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...

Posted: Wed Jul 16, 2003 6:23 pm
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.

Posted: Wed Jul 30, 2003 5:14 pm
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///

I agree with the both requests

Posted: Tue Aug 05, 2003 2:01 pm
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.

Posted: Tue Aug 05, 2003 2:29 pm
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.

Posted: Tue Aug 12, 2003 1:05 am
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.