[Geany] tuning Geany key combos

Enrico Tröger enrico.troeger at xxxxx
Tue Jun 26 16:37:35 UTC 2007


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:
> >
> > [snip]
> >
> > >    * Ctrl-U, Shift-Ctrl-U --> Use Ctrl-U to toggle. Then use
> > >      Shift-Ctrl-U to toggle first-letter capitalization. Yes. :)
> > What about this string "aBcD" -> toggle to lower or upper case?
> 
> I've found that the only times I need to mess with capitalization are:
> 
> 1. When I've got a capitalized word that starts a sentence, but I add
> a word in front of it, so need to make the capitalized word lowercase.
> Likewise if I delete some words at the beginning of a sentence and
> want the next one to start the sentence, I need to capitalize it. Also
> sometimes when hopping through a sentence word-by-word and need to
> capitalize some proper names. Not *too* common, but sometimes handy.
> 
> 2. To either make something all caps, or to make something all
> lowercase if someone was yelling at me. :)
> 
> I've never had to swap case as you describe. What situation would one
> need to do that?
I came across this situation several times when copying text from
somehwere or when writing code and copying some descriptive text("Show
XYZ") as a variable name("show_xyz"). Then I lower down the string. I
could also just rewrite it but why? I'm lazy and Geany can lower down
the string. But when only toggle is available Geany would have to dice
to choose whether I want the string in lower or upper case.

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.

> > >    * 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.
> >
> > 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 ;-)).

> Also sometimes if you're putting ascii-art things in your comments
> (like primitive diagrams with boxes and arrows) and you're trying to
> make them line up right.
> 
> Also if you're writing out a list:
> 
> * one
> * two
>   * two point five
>   * two point seven
> five plus epsilon
> * two point eight
> * two point nine
> * whoops -- indented these last lines wrong.
> 
> and need to move those last lines out by 2 spaces.
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.

> > But because of talking about indentation: I plan to add a feature to
> > auto indent current line by pressing a key. This means, the current
> > line will be indented according to the previous line independent of
> > the current indentation(maybe too less or too much indentation).
> 
> Heh. That sounds exactly like what Emacs does. :)
Yes, it was suggested by a new Geany user who switched from Emacs ;-).

> > In general, Alt+letter key bindings are not very good for GUI apps.
> > Because Alt+letter opens a file menu item where letter is used as a
> > mnemonic(the underlined letter in the file menu item). And remember,
> > the file menu items are translatable. I.e. you can't know which Alt
> > +letter keybinding is used in any translation for any file menu item
> > (I only speak of the first level menu items, File, Edit, View, ...).
> > An example: Alt+T opens the Tools file menu item in Geany without
> > any translation. To open this menu in Geany with a German
> > translation you need Alt+W (German translation is "Werkzeuge").
> 
> Oh my. Hm. Didn't realize they changed for different languages.
They have to change. To keep the above example:
"Werkzeuge" is the German translation(better: one of the possible
translations) and it contains no 't', so how should the mnemonic keep?

> Ok, well, I see that the Preferences --> Keybindings tab does not
> provide a way to change the keybindings for activating menus. If I
Because they can't be changed AFAIK and they shouldn't. They are
defined by the translation.

> So, currently, if I use an Alt key that's already being used for a
> menu, then I lose the ability to activate that menu via the keyboard.
> If you're committed to using those menu name first letters along with
> changing them for various translations, then users will just have to
> live with stealing Alt key bindings sometimes.
>
> Personally, the only time I've ever used the Alt keys to activate
> menus was once a long time ago when my mouse got unplugged somehow
> while using a GUI and I needed to save and shutdown the computer. :)
> But maybe other folks use them regularly.
Personally, I don't use the keyboard to activate the file menu, too.
But I guess there are many people who uses the mnemonics because it is
a very common way of accessing the menus.
So, IMO removing or overriding these mnemonics by default is no option.

> > > Incidentally, can someone please point me to the docs on
> > > creating my own ~/.geany/keybindings.conf? I looked in the
> >
> > No docs so far. Just open the preferences dialog, keybindings tab
> > and change what you like to. After that, the file
> > ~/.geany/keybindings.conf is created with your changed settings.
> 
> Ah. Sweet. I see: change one, and they all show up in the
> keybindings.conf file. Nice.
Yes, this file is created once you changed any of the default
keybindings and in general there should be no need to manually edit the
file because every available and configurable keybinding can be changed
in the preferences dialog.


Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.key
Powered by Debian GNU/Linux, GnuPG and Sylpheed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20070626/dd8c4a6e/attachment.pgp>


More information about the Users mailing list