How do I make auto-close brackets to work? |
|
Check your settings under 'editor settings' -> auto-close brackets.
|
||||||||||||
|
|
Thank you.
They were not enabled, I enabled it and now it works. I think this should be enabled by default. |
||||||||||||
|
|
I would just like to chime in and say these don't work as I expected they would.
When typing a line of code that has many brackets or parenthesis, I know of no hotkey to skip over the auto-closed brackets so I figure typing them would be the next logical way to skip over them (other than the arrow keys). However, typing them again does not skip over them (like auto-close quotes) but rather inserts them. This is happening on build 5219. Anyone else see this problem, or know the hotkey to skip over the auto-closed brackets? |
||||||||||||
|
Site Admin
|
well, if you got it right, there is no problems at all.
If you have a bracket on the right of the cursor and you type the same bracket, why would it be skipped/swallowed? Is there any reason for this? For example: say, you have |] and then you type ] why would it get ]| and not ]|] |
||||||||||||
_________________ The PHP IDE team |
|
Okay, let me counter you and say this: If you got auto-close brackets right, wouldn't the same exact functionality be expected of auto-close quotes? So why is it that when you have that enabled, and you have say:
$var = 'This is a string with an auto closed quote|' The "|" being where the cursor is. Then you press the quote key, it skips over it. It does this even inside other quoted strings. So by your thinking, either the auto-close brackets are right, and the quotes are wrong, or the quotes are right and the brackets are wrong. Which one is it? I only bring this up because almost every other piece of software that has auto-closing quotes & brackets behaves the same way. You can skip over them if you type them again, or there's a hotkey that you press to skip over them. |
||||||||||||
|
|
That is exactly the point I was trying to make here. Please change this in your software.
|
||||||||||||
|
|
It also goes back to THIS topic where i originally said that they didn't work properly. To which the quotes were changed to act as expected (typing another one skips right over); however, the brackets were never fixed.
I'm getting 5220 right now, it's not listed as a fix, but hey, they don't actually generate a real list of improvements & fixes (like say the one Mozilla releases with builds). Nope.... still not working in 5220.... for $300... the least it could do is act in some uniform fashion. I mean, why would the quotes act one way, but the brackets the complete opposite? |
||||||||||||
|
Site Admin
|
they can't be handled in exactly the same way, just because there are no such things as opening and closing quotation marks while with brackets you always have closing and opening ones. Finally I'm not sure that after the functionality is chaged, there will be no requests to return it back. So it'd be better if you submit a feature request with qustions to be voted. |
||||||||||||||
_________________ The PHP IDE team |
|
Wait.... what do you mean quotes don't have opening and closings? Have you not learned the English language? Forgive me for my bluntness, but come on. There are opening and closing quotes. If there weren't, then to quote something you wouldn't have "Begin quote" whatever needs to be quoted "End quote" in conversations, or you would only see:
"This is something someone said in written text. If you actually think about it, there are closing quotes, they just don't display differently. Then again, in Microsoft Word, the opening quotes look like a filled in 6, while the closing quotes look like a filled in 9. So you're saying that those aren't opening and closing? That's not to mention that if you were to create a PHP page and leave the string open (i.e. no closing string delimiter, which is a quotation mark (either double or single)) then you'd get a PHP error like:
To further validate that quotation marks are in fact pairs with an opening or closing one, Wikipedia says:
I'm sorry, but could you please think before you respond in this forum? I know you're an admin and everything, and you work on the product, but unfounded answers to legitimate issues is not the way to grow your customer base. EDIT
After it's changed, I'm not sure there will be requests to change it back. Even so, you could make an extra checkbox that enables only if auto-close brackets is enabled which says "Automatically skip over closing brackets" which does what we're asking. |
||||||||||||||||||
|
|
I believe what dmitri meant was that the start & end quote are the same character (' or "). () are different, as well as {} being different. |
||||||||||||||
|
|
Well, technically they're not the same character, they're just the same typed character. Inside the English language, there are opening and closing quotes (as opening are usually written to reflect a filled "6" and closing to reflect a closed "9") but it's grown to be just two lines instead of real quotes. Same with single quotes. It still doesn't matter. no matter what, with the exception of escaped quotes, you MUST have an even number of quotes in your PHP files. And since we can have settings based on PHP, why can't this be added? When one bracket is entered, +1 for that type, when it's closed -1. If it's 0, then you're fine, if it's +1 and auto-close brackets is enabled, skip the already showing quote.
EDIT Sorry, used "quotes" in my last part instead of "brackets" |
||||||||||||
Last edited by bpat1434 on Tue Dec 11, 2007 7:50 pm; edited 1 time in total |
How do I make auto-close brackets to work? |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by