Typing symbols "", '', (), {} in pairs
Moderator: kfury77
Forum rules
Please follow these guidelines when posting feature requests. This will help to increase the value of your contribution.
Please follow these guidelines when posting feature requests. This will help to increase the value of your contribution.
- Do not create new topics for already requested features. Add your comments to the existing feature request topics instead;
- Create separate topic for each feature suggestion. Do NOT post a number of non-related feature suggestions in a single topic;
- Give your topic a meaningful title. Do NOT create topics with meaningless titles, such as "My Suggestion" or "My Problem".
Typing symbols "", '', (), {} in pairs
Hi,
It seems to me that symbols such as ", ', (, ), {, } in most cases could be typed in pairs, that is, if the left one is typed the right one immediately appears on the screen. This feature would be a nice improvement of usability.
The most elegant implementation of this feature I have seen is in PSPad Editor.
It seems to me that symbols such as ", ', (, ), {, } in most cases could be typed in pairs, that is, if the left one is typed the right one immediately appears on the screen. This feature would be a nice improvement of usability.
The most elegant implementation of this feature I have seen is in PSPad Editor.
-
- Posts: 32
- Joined: Tue Feb 05, 2008 4:40 pm
- Location: Amsterdam
- Contact:
that could indeed be helpful.. IF it's an option you can turn off (for those of us who type faster then we think
)
a workaround I've been using for quite some time (and this might be useful for you too) is adding those to your library and place them under their corresponding keys with a modyfier.. ie;
[] = Ctrl + [
{} = Ctrl+shift+[
'' = Ctrl + '
"" = Ctrl + shift + '
I have to say this works pretty well... (and no erronous extra entries when your editing
)

a workaround I've been using for quite some time (and this might be useful for you too) is adding those to your library and place them under their corresponding keys with a modyfier.. ie;
[] = Ctrl + [
{} = Ctrl+shift+[
'' = Ctrl + '
"" = Ctrl + shift + '
I have to say this works pretty well... (and no erronous extra entries when your editing

-
- Posts: 43
- Joined: Thu Jan 10, 2008 11:55 am
thanks
Hey, thanks for the suggestion multifarious it works great!
Hi, Gatis,
Certainly, there is demand for this feature and ability to type symbols ", ', (, ) in pairs is as much important as ability to type { and } in pairs.
Consider, for example such situation:
At first I do some HTML coding such as this
Coding this I need symbols "" to be inserted as pair and the cursor to be placed between them.
After coding this I start programming some javascript such as this
Coding this I need symbols () and '' (I prefer single quotes in javascript) to be inserted as pair and the cursor to be placed between them.
Then I proceed as this
Coding this I need symbols {} and [] to be inserted as pair and the cursor to be placed between them.
I have written here only a couple of lines of code, but to write them I needed to be able to insert all of the mentioned symbols - '', "", {}, [] - as pairs.
Certainly, there is demand for this feature and ability to type symbols ", ', (, ) in pairs is as much important as ability to type { and } in pairs.
Consider, for example such situation:
At first I do some HTML coding such as this
Code: Select all
<div> id="some_id">
some code
</div>
After coding this I start programming some javascript such as this
Code: Select all
var my_div=document.getElementById('some_id');
Then I proceed as this
Code: Select all
var aElements=my_div.getElementsByTagName('a');
for (var i=0; i<aElements.length; i++) {
if (aElements[i].className=='some_claassname') {
some code
}
}
I have written here only a couple of lines of code, but to write them I needed to be able to insert all of the mentioned symbols - '', "", {}, [] - as pairs.
-
- Posts: 43
- Joined: Thu Jan 10, 2008 11:55 am
a different coding style
Code: Select all
var aElements=my_div.getElementsByTagName('a'); for (var i=0; i<aElements.length; i++) { if (aElements[i].className=='some_claassname') { some code } else { other code } }
I used to write my code like that (above) and a lot of people still do. But after writing *a lot* of code and experimenting a bit, and looking at how some other "php gurus" format their code. I eventually switched to a different style which I find to be much more readable and helps to avoid mistakes of mismatched brackets. Here is how I do it now.
Code: Select all
var aElements=my_div.getElementsByTagName('a');
for (var i=0; i<aElements.length; i++)
{
if (aElements[i].className=='some_claassname')
{
some code
}
else
{
more code here.... notice that it is a lot more readable.
who cares if it makes the program a little bit longer,
I never print them anyway. the days of paper are fading.
}
}
I agree that the coding style in fuzzylogic example is better than in my example. The issue in this thread seems to be neutral in respect to different coding styles. Whatever the coding style it is quite handy to be able to type symbols such as ", ', (, ), {, }, [, ] in pairs.
To the list of these symbols I would like to add yet another pair of symbols: < , >. It would be handy if coding html these symbols would be typed in pairs and cursor placed between them.
To the list of these symbols I would like to add yet another pair of symbols: < , >. It would be handy if coding html these symbols would be typed in pairs and cursor placed between them.
-
- Posts: 32
- Joined: Tue Feb 05, 2008 4:40 pm
- Location: Amsterdam
- Contact:
maybe something like a configurable option where you can add and remove pairs at will?
like: start - end - trigger
sortof like an autoreplace-library-snippet hybrid..
since I'd imagine depending on your coding environment you could need different sets of those.. (didn't HomeSite offer such an option..?)
And really, please please pwetty please, if you DO decide to implement this behaviour: allow me to turn it off!! *begs*

like: start - end - trigger
sortof like an autoreplace-library-snippet hybrid..
since I'd imagine depending on your coding environment you could need different sets of those.. (didn't HomeSite offer such an option..?)
And really, please please pwetty please, if you DO decide to implement this behaviour: allow me to turn it off!! *begs*

Patrick Kanne - webmaniac
- as we fail to imagine, we are punished with reality
- as we fail to imagine, we are punished with reality
Auto-skip second bracket and auto-surround selection
It would be cool if you typed the left bracket or quote and the other one just popped in there, and the next time you typed that closing [whatever] the cursor just jumped over it (for those of you who type faster than you think...).
I would also really dig selecting some text and then maybe hitting the closing [whatever] and it automatically surrounds the selection in [whatever's], like the <b>bold</b> shortcut...
I would also really dig selecting some text and then maybe hitting the closing [whatever] and it automatically surrounds the selection in [whatever's], like the <b>bold</b> shortcut...
Matthew N.
Power Tie Marketing
Power Tie Marketing
Re:
There is a demand, especially for PHP programming - already mentioned over one year agoGatis wrote:If we see there is demand, we will certainly add some more items later in some update.

http://forums.blumentals.net/viewtopic.php?f=1&t=2127
.