[Geany] tuning Geany key combos

Nick Treleaven nick.treleaven at xxxxx
Thu Jun 28 12:57:49 UTC 2007


On 06/26/2007 07:03:48 PM, John Gabriele wrote:
> On 6/26/07, Enrico Tröger <enrico.troeger at uvena.de> wrote:
>> On Tue, 26 Jun 2007 11:43:27 -0400, "John Gabriele"  
>> <jmg3000 at gmail.com>
>> wrote:
>> 
>> > On 6/26/07, Enrico Tröger <enrico.troeger at uvena.de> wrote:
>> > > On Tue, 26 Jun 2007 00:41:07 -0400, "John Gabriele"
>> > > <jmg3000 at gmail.com> wrote:
> I'd go with the more common operation -- go all lowercase first.
> Besides, you're already holding down the Ctrl key and you want
> uppercase, you just tap 'U' again.
> 
>> Is it really a problem to have two key bindings for that? AFAIK I
>> always seen two bindings resp. two actions for lowering or uppering  
>> the
>> case in other apps.
> 
> No. The only problem is that using the Shift key to do the opposite of
> the un-Shifted command feels backwards, and IMO is more difficult for
> users to remember. Whenever I need to use Shift to do an opposite
> operation, my brain has to stop short and go, "oh, right. yes, I know
> Shift usually enhances the command in some way, but for this special
> case it makes it do the opposite".
> 
Well there is Shift-F3 for search backwards too. Personally I find it  
easier to remember with shift for things like that, and it frees up  
more keys for other keybindings. But for indenting maybe ctrl-0 and  
ctrl-9 are better. I think that's because it's easier to associate with  
left and right.

[...]
> Anyhow, not a big deal at all. The current way just seems inconsistent
> to me. What's more important, IMO, is the Ctrl-G Shift-Ctrl-G issue,
> where we wrote:
> 
>> >    * Ctrl-G, Shift-Ctrl-G --> Use Ctrl-G to toggle.
>> 
>> No. Then you can't double comment a line. Ok, uses should be not that
>> much but e.g. when commenting a block of code including some  
>> commented
>> lines this would uncomment these particular lines which is mostly
>> unintended. Maybe we could change Ctrl+B to Alt+G but it would be  
>> just
>> a change of the default binding.
> 
I like the way SciTE does it - by using '//~' so no comments are lost  
when toggling commenting (it uses ctrl-Q, but that's normally quit for  
GTK-apps):

//~ line
//~ //commented line

> This one is probably a fairly heavily-used feature, and using Shift to
> make Ctrl-G do the opposite doesn't feel right. On the bright side,
> since Ctrl-G isn't really mnemonic for commenting (well, I don't think
> it is in english anyway), it seems like you could pretty easily find a
> 2nd key for uncommenting. Do many users use Ctrl-B? If not, then
> maybe:
> 
> * Ctrl-G to comment
> * Ctrl-B to uncomment (go *b*ack :) )
> 
I use the toggle comment the most (but I reassigned it to ctrl-').

> Another possibility is using non-alphanumeric keys for this. Say,
> 
> * Ctrl-# (Shift-Ctrl-3) to comment
> * Ctrl-@ (Shift-Ctrl-2) to uncomment
> 
> since the keys are right next to eachother, and a number of languages
> use '#' as the commenting character. This could also be nice because
> it frees up Ctrl-G, in case you needed that nice juicy key-combo for
> something else. :)
> 
The problem with non-alphanumeric keys by default is that different  
keyboard layouts require shift differently, and sometimes other  
modifier keys instead.

>> > > >    * Tab, Shift-Tab --> use Ctrl-9 & Ctrl-0 to indent/de-indent
>> > > >      by one space, and Ctrl-) & Ctrl-( to indent/de-indent by
>> > > >      one tab width.
>> > >
I like this, but maybe it should be the other way around - on most  
layouts ctrl-number is easier for common tab width indenting, and  
holding shift for the less common case makes sense (for me anyway).

>> > > Who needs indentation by one space?
>> >
>> > When you select some text (say, you're cleaning up some
>> > poorly-indented code), and you need to shift it around but aren't
>> > exactly sure what column you need it at. You "tap right a few  
>> times,
>> > left, ah -- got it".
>> 
>> Hmm, usually I do this by removing all indentation(Ctrl+Shift+I
>> several times) and then re-indent the code as I like. Not necessarily
>> faster but safer especially when the code was indented with spaces  
>> and
>> you want to indent by tabs(my preference as you know ;-)).
> 
I do it like this too (as I prefer tabs).

>> [snip]
>> Ok, but is it too hard to just use the space key in combination with
>> the cursor keys for navigation? Yes this needs more work, more
>> keystrokes but IMO it is a quite seldom use case.
> 
> I use the feature every so often. When you need it, it's very nice.
> 
When I need to do this I use the rectangular selection to delete or  
copy & paste, which is quicker than manually. Or even a regex replace,  
but I tend to use it not for indenting.

Not using spaces, I don't know how often this is needed, but other  
editors have it and it could be useful.

Regards,
Nick



More information about the Users mailing list