From: Jon Guyer (jguyer@his.com)
Date: 11 Mar 01, 07:29 EST
From: Jon Guyer <jguyer@his.com>
Subject: Re: how does BBEdit do it? (was Re: A few issues...)
At 9:31 AM -0800 3/10/01, Albert Davidson Chou wrote:
>Not to beat a dead horse, but just out of curiosity, what _are_ Bare
>Bones's key
>sequences for this? I wasn't able to figure it out trying for
>myself in BBEdit
>5.1.1, nor looking in its Apple Guide.
Let's see if I can explain it. Click before 'C' at the beginning of
this sentence, hit <up><up><right><right> and you get a selection
from 'e' in "Apple" to 'l' in "Click". Same behavior that Alpha and
others have. The difference is that <left><left> contracts the
selection back to before 'C' in "Click". Hit <down><up><left> to
switch the active end and expand the selection to include the 'l' in
"Apple".
Some BBEdit users have been complaining that it requires too much
thought. I'm inclined to agree. Nonetheless, I'd argue for an option
of replicating this behavior exactly, just so we can ruthlessly steal
users from Bare Bones. I'd also like to see some experimentation with
(i) a binding that would toggle between Alpha's current "always
expand" mode to an "always contract" mode and (ii) an
anchor-and-free-end model that lets you toggle which end is anchored
(using something besides arrow keys to do the toggling). I am not
even remotely interested in a "maybe there's an anchor and maybe
there's not" mode.
I think the default should remain as it is (with the possible
addition of (i)), because that's what Alpha's users know and expect
and this is only the second time the subject has come up in four
years. There's nothing to prevent a preference to switch to either
(ii) or (BB), though.
Here's a starting point for (i) that uses <shift><ctrl><arrow> for contraction:
proc forwardCharContract {} {
select [getPos] [pos::math [selEnd] - 1]
}
proc backwardCharContract {} {
select [pos::math [getPos] + 1] [selEnd]
}
proc nextLineContract {} {
set rowCol [posToRowCol [getPos]]
select [rowColToPos [expr [lindex $rowCol 0] +1] [lindex $rowCol 1]] \
[selEnd]
}
proc prevLineContract {} {
set rowCol [posToRowCol [selEnd]]
select [getPos] \
[rowColToPos [expr [lindex $rowCol 0] -1] [lindex $rowCol 1]]
}
Bind right <zs> forwardCharContract
Bind left <zs> backwardCharContract
Bind up <zs> prevLineContract
Bind down <zs> nextLineContract
--
Jonathan E. Guyer
<http://www.his.com/jguyer/>
_______________________________________________
AlphaTcl-developers mailing list
AlphaTcl-developers@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/alphatcl-developers