On 6/26/07, Enrico Tröger enrico.troeger@uvena.de wrote:
On Tue, 26 Jun 2007 11:43:27 -0400, "John Gabriele" jmg3000@gmail.com wrote:
On 6/26/07, Enrico Tröger enrico.troeger@uvena.de wrote:
On Tue, 26 Jun 2007 00:41:07 -0400, "John Gabriele" jmg3000@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:
- 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.
- 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.
I'm sorry -- I should've been more clear and written "I've never had to swap *mixed* case as you describe." (emphasis added). I actually misread what you wrote and thought you were talking about having to turn "aBcD" into "AbCd". This operation seems like an oddball sort of transformation that probably shouldn't take up a key-combo.
So, yeah, my idea is that if you had "Show XYZ", you'd just add the underscore, use Alt-W (whoops -- already mapped that to "select current word" :) ), then hit Ctrl-U to get "show_xyz". If you accidentally tap Ctrl-U twice, you'll end up with "SHOW_XYZ" and you'll need to tap it one more time to get what you want.
But when only toggle is available Geany would have to dice to choose whether I want the string in lower or upper case.
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".
If I were assigning two different keys for case transformation, one might be tempted to try and use:
* Ctrl-U for uppercase. Alt-U for just capitalize first letter. * Ctrl-L for lowercase. Alt-L for just lowercase first letter.
but that takes up way too many valuable key combos for just twiddling case. :)
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.
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 :) )
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. :)
- 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 ;-)).
[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.
It might be something to mull over for users who use all spaces and who write lots of code comments. :) Again -- this one's not a big deal, it just falls nicely out of using '9' and '0', '(' and ')', and using Shift to extend Ctrl keys. If you thought it would improve Geany, you could always provide it as an available function without a default key-combo assigned to it, leaving users the choice of the map it somewhere if they wanted to.
Judging by the way this discussion is unfolding, I bet that there will always be a group of Geany users who remap Alt key combos to suit themselves, living with the fact that they'll sometimes be overriding the Alt menu commands. I think this is fine.
Thanks, ---John