[code] Auto-pairing feature request

From: Michael Richter <ttmrichter.att.gmail.com>
Date: Wed, 30 Jan 2013 21:19:11 +0800

I like the auto-pairing of symbols like ", ', (, et al but for one tiny
annoyance: breaking OUT of the pair slows me down.

Let's say I want to type the following line:

turing(bb_config, busy_beaver, [], To).

First I type this where the ^ marks my cursor location:

turing(^)

This is all fine and dandy. Now I keep typing.

turing(bb_config, busy_beaver, [^])

Again all fine and dandy. But here it breaks down. To get *out* of the
square brackets I have to move my hand away from the convenient places of
my keyboard and over to the cursor controls. This is a distraction for
reasons I'll get into later. So anyway, I continue typing:

turing(bb_config, busy_beaver, [], To^)

Now I have to move my hand away from the typing space *again* to escape the
parens. Finally I can finish and type the whole line.

Many editors do the pair-matching thing. All of them that I've used (most
recently Sublime Text, <plug type="shameless">for which review you can read
here:
http://yfl.bahmanm.com/Members/ttmrichter/software-reviews/sublime-text-2-review</plug>)
have the following behaviour. Let's turn back the clock to this:

turing(bb_config, busy_beaver, [^])

I'm in the auto-matching mode, so when I type ], I don't insert an
unbalanced closing bracket, I instead just move forward past the bracket
like this:

turing(bb_config, busy_beaver, []^)

Then I continue typing to this:

turing(bb_config, busy_beaver, [], To^)

I hit the closing paren and get this instead:

turing(bb_config, busy_beaver, [], To)^

I can then easily follow up with the period. No muss, no fuss, no bother.

Now in this line of code alone I've had to move my hands away from the
typing area twice. And this is simple Prolog code. Could you imagine if I
was doing Java or, worse, Lisp? My hands would rarely be in the typing
space with all the bracket-jumping I'd have to do.

So as a feature request, would it be possible to somehow break out of the
matched parens without moving the hand away from the main keyboard area?
Ideally typing the matching closing character would be the technique, but
I'm open to other ideas that keep my fingers in my active zone. I really
like the auto-pairing feature so I'd rather not turn it off completely.

-- 
"Perhaps people don't believe this, but throughout all of the discussions
of entering China our focus has really been what's best for the Chinese
people. It's not been about our revenue or profit or whatnot."
--Sergey Brin, demonstrating the emptiness of the "don't be evil" mantra.
-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Wed 30 Jan 2013 - 08:19:11 EST

This archive was generated by hypermail 2.2.0 : Thu 31 Jan 2013 - 06:37:23 EST