feature req: a smarter auto-close brackets and quotes ?? |
Site Admin
|
what if we implement it a bit differently? Suppose you have a string and want to surround it by quotes or brackets, you'll select it and press opening bracket or quote to achieve that. Would this satisfy you?
|
||||||||||||
|
|
Hi!
first of all thanks for prompt reply! the solution you suggested is good , and it should exist too. BUT: this demands a user to use the mouse, and if you are a programmer, you know how lazy programmers are to move fingers from keyboard to the mouse... i like to do as much as possible ONLY with the keys, without the mouse... call me mad, but this is faster and easier... once you learn all the shortcuts but if only i am like this, it would not be an issue, but i bet that many PHP programmers are like that... its really annoying to do this thing over and over: type some code, then i want to enclose it in brackets, (or quotes) and then i go to the beginning of that text, type opening bracket/quote, and editor inserts a closing one !!! then i delete this closing one, and go to the end of the text and type the closing bracket/quote by myself... i do this hundreds of times a day, believe me. and if i switch to DO NOT CLOSE BRACKETS/QUOTES in settings, then i miss this when i do not want to enclose text... so its a case of: you cant live with it, and you cant live without it so please reconsider this... as i said: your solution is great and implement it too, but consider a solution without using a mouse !!! tnx, Slobo |
||||||||||||
|
Site Admin
|
btw you can select text without mouse actually, Ctrl+Shift+right arrow works quite good.
|
||||||||||||
|
|
You are right about that shortcut, but its still more buttons to press...
computers should work for humans, not vice versa its much easier that computer 'decides' when it should auto-close brackets/quotes, and when it should not do it. if you would put some logic in there it would help. Why pressing Ctrl-Shift-Right when computer can do that for you ? Regards Slobo |
||||||||||||
|
Site Admin
|
Yet, "computer" can't decide where the string ends.
Suppose I have if ($a == some strange text here && $b) { } and cursor is just left to word "some" and you enter quotation mark. Where would computer place closing quotation mark? After "some"? After "here"? After $b? How would it make a proper decision? What if text is like below? if ( $a == some strange text here && $b ) { } |
||||||||||||
|
|
I Agree its a tough one.
i was thinking about this also, there are few possible answers... 1. editor can put closing bracket/quote after the last non-space character in the line, like this: if i type: $var1 == 10 and later I add opening bracket in front of $var1 like this: ($var1 == 10 then editor can be 'smart' and add closing bracket after the last non-space character in that line: ($var1 == 10) (this is the best solution i could find so far). 2. editor can be 'smart' and auto-close brackets/quotes ONLY if there is NO TEXT in front of the opening bracket. - if there is no text => close bracket/quote - if there is a text there, dont close it so if there is a text: $var1 == 10 and later I add opening bracket in front of $var1 like this: ($var1 == 10 then editor can be 'smart' and dont do nothing (do not auto-close bracket). then i can go to the end of that line with END key and close bracket by myself. (this way i would not have to first delete the one that editor created, and then create my own, at the end of line. both solutions are usefull and could be implemented easily... all this behaviour could be configured with settings to meet the users desires. DONT AUTO CLOSE BRACKETS/QUOTES WHEN THERE IS TEXT AFTER OPENING BRACKET [ ] or PUT AUTO-CLOSING BRACKET/QUOTE AT THE END OF THE CURRENT LINE [ ] and also if user do not want this 'smart' auto-close he/she can switch off this settings checkboxes, right? i hope you will find this satisfactory let me know what you think... tnx Slobo |
||||||||||||
|
feature req: a smarter auto-close brackets and quotes ?? |
|
||
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