(Sorry for the duplication Enrico -- meant to send this to the list.)
On 8/9/06, Enrico Tröger enrico.troeger@uvena.de wrote:
Hi,
Geany 0.8 has been released.
Thanks! Great to see all this progress with Geany. :)
Changes since Geany 0.7: [snip]
- Added support for back references when using regex replace.
Nice. :) But, I think I found a problem with it. Try putting this into your file:
LiquidCooled WaterCooled
Then try the following Search/Replace: search text: [A-Z]([a-z]+)Cooled replace text: XXX\1Cooled
It works the first time through, but then if you make the search loop around, the 2nd time it finds too much (all three of the X's instead of just the first one), and the replacement gives you a strange number of X's...
In fact, if you start that over, and change the replace text to: XXX-\1Cooled, then when the search wraps around, it incorrectly finds "iquidCooled" (which comes after the "XXX-").
[snip]
- Scroll to 1/4 of the view when jumping to a line number.
Very nice. :) As are a number of the other new features listed here.
What might also be useful is, when you're searching (either Find or Replace), when you move on to the next search result, instead of having it be at the bottom line of the window, it would be nice if the window were scrolled up just a bit, to give the user a little context of what they're looking it. This would be especially helpful when doing a lot of manual Searching/Replacing and you have to look at each case.
[snip]
- Added keyboard shortcuts for increase/decrease of line indentation.
Hm. Previously I just used Tab and Shift-Tab. I now notice that there's an "Edit --> Format --> {Increase|Decrease} Indent" menu item. Using the Tab key seems sensible to me. Why add the Ctrl-I and Shift-Ctrl-I?
Also, I notice that if I select some block of text and use Tab/Shift-Tab, indent/de-dent works as expected, but fails with Ctrl-I/Shift-Ctrl-I (it only shifts one line -- not the whole selection).
---John
On Thu, August 10, 2006 18:40, John Gabriele wrote:
Hi,
[snip]
- Added keyboard shortcuts for increase/decrease of line indentation.
Hm. Previously I just used Tab and Shift-Tab. I now notice that there's an "Edit --> Format --> {Increase|Decrease} Indent" menu item. Using the Tab key seems sensible to me. Why add the Ctrl-I and Shift-Ctrl-I?
Why not. Tab and Shift-Tab is still working(even better than Ctrl+I as we see below). The main reason for Ctrl+I was that it was requested(#1521717).
Also, I notice that if I select some block of text and use Tab/Shift-Tab, indent/de-dent works as expected, but fails with Ctrl-I/Shift-Ctrl-I (it only shifts one line -- not the whole selection).
This is a bug, will be fixed soon.
regards, Enrico
On 10/08/06 17:40:27, John Gabriele wrote:
On 8/9/06, Enrico Tröger enrico.troeger@uvena.de wrote:
Changes since Geany 0.7: [snip]
- Added support for back references when using regex replace.
Nice. :) But, I think I found a problem with it. Try putting this into your file:
LiquidCooled WaterCooled
Then try the following Search/Replace: search text: [A-Z]([a-z]+)Cooled replace text: XXX\1Cooled
It works the first time through, but then if you make the search loop around, the 2nd time it finds too much (all three of the X's instead of just the first one), and the replacement gives you a strange number of X's...
I think you don't have case sensitive checked ;-) So [A-Z] is the same as [a-z]. It works if you use case sensitive regexes.
Regards, Nick
On 8/11/06, Nick Treleaven nick.treleaven@btinternet.com wrote:
On 10/08/06 17:40:27, John Gabriele wrote:
On 8/9/06, Enrico Tröger enrico.troeger@uvena.de wrote:
Changes since Geany 0.7: [snip]
- Added support for back references when using regex replace.
Nice. :) But, I think I found a problem with it. Try putting this into your file:
LiquidCooled WaterCooled
Then try the following Search/Replace: search text: [A-Z]([a-z]+)Cooled replace text: XXX\1Cooled
It works the first time through, but then if you make the search loop around, the 2nd time it finds too much (all three of the X's instead of just the first one), and the replacement gives you a strange number of X's...
I think you don't have case sensitive checked ;-) So [A-Z] is the same as [a-z]. It works if you use case sensitive regexes.
Gah! Ouch. Missed that. Thanks.
Incidentally, in a previous thread (http://lists.uvena.de/pipermail/geany/2006-August/000358.html) I requested that, when the user clicks that "Use regular expressions"checkbox, that it might be a good idea to automatically select the "Case sensitive" option too, since users will be expecting that regexes start off case-sensitive by default. Nick, you mentioned you didn't think it's necessary, but I think it's kinda' funny that I was caught by it myself (embarrassingly, after previously bringing it up!). I will now train myself to always check that option whenever I select the regex option (since almost all of my regex searches are case sensitive), but if you think that the majority of your users will also have to train themselves like that, you might reconsider setting the option automatically. Principle of least surprise and all. :)
Thanks again! ---John
On 11/08/06 15:21:46, John Gabriele wrote:
On 8/11/06, Nick Treleaven nick.treleaven@btinternet.com wrote:
On 10/08/06 17:40:27, John Gabriele wrote:
On 8/9/06, Enrico Tröger enrico.troeger@uvena.de wrote:
Changes since Geany 0.7: [snip]
- Added support for back references when using regex replace.
Nice. :) But, I think I found a problem with it. Try putting this
into
your file:
LiquidCooled WaterCooled
Then try the following Search/Replace: search text: [A-Z]([a-z]+)Cooled replace text: XXX\1Cooled
It works the first time through, but then if you make the search
loop
around, the 2nd time it finds too much (all three of the X's
instead
of just the first one), and the replacement gives you a strange
number
of X's...
I think you don't have case sensitive checked ;-) So [A-Z] is the same as [a-z]. It works if you use case sensitive regexes.
Gah! Ouch. Missed that. Thanks.
Incidentally, in a previous thread (http://lists.uvena.de/pipermail/geany/2006-August/000358.html) I requested that, when the user clicks that "Use regular expressions"checkbox, that it might be a good idea to automatically select the "Case sensitive" option too, since users will be expecting that regexes start off case-sensitive by default. Nick, you mentioned you didn't think it's necessary, but I think it's kinda' funny that I was caught by it myself (embarrassingly, after previously bringing it up!). I will now train myself to always check that option whenever I select the regex option (since almost all of my regex searches are case sensitive), but if you think that the majority of your users will also have to train themselves like that, you might reconsider setting the option automatically. Principle of least surprise and all. :)
Well, the problem is twofold: 1. It could be surprising that the case sensitive option becomes checked when regexes are checked. 2. What to do when regexes are unchecked - unchecking case sensitive search could be surprising too.
I wonder about having a separate checkbox for regex case sensitive - this would seem to fix the above problems.
Regards, Nick
On 8/11/06, Nick Treleaven nick.treleaven@btinternet.com wrote:
On 11/08/06 15:21:46, John Gabriele wrote:
On 8/11/06, Nick Treleaven nick.treleaven@btinternet.com wrote:
[snip]
I think you don't have case sensitive checked ;-) So [A-Z] is the same as [a-z]. It works if you use case sensitive regexes.
Gah! Ouch. Missed that. Thanks.
Incidentally, in a previous thread (http://lists.uvena.de/pipermail/geany/2006-August/000358.html) I requested that, when the user clicks that "Use regular expressions"checkbox, that it might be a good idea to automatically select the "Case sensitive" option too, since users will be expecting that regexes start off case-sensitive by default. Nick, you mentioned you didn't think it's necessary, but I think it's kinda' funny that I was caught by it myself (embarrassingly, after previously bringing it up!). I will now train myself to always check that option whenever I select the regex option (since almost all of my regex searches are case sensitive), but if you think that the majority of your users will also have to train themselves like that, you might reconsider setting the option automatically. Principle of least surprise and all. :)
Well, the problem is twofold:
- It could be surprising that the case sensitive option becomes
checked when regexes are checked. 2. What to do when regexes are unchecked - unchecking case sensitive search could be surprising too.
I wonder about having a separate checkbox for regex case sensitive - this would seem to fix the above problems.
Well, if the checkboxes could be arranged to look hierarchically (so the one beneath "Use regular expressions" would be indented), I think it would look right.
If you went that route, I might suggest the following:
0. The new option would be called "Case-insensitive regular expressions", since the default (not selected checkbox) should be case-sensitive, IMO.
1. When you select "Use regular expressions", "Case sensitive" gets greyed out.
2. When "Use regular expressions" is not selected, "Case-insensitive regexes" is greyed out.
As usual with the other options, they'd remember the way you last had them checked, though I'd have the "Case-insensitive regexes" checkbox start off life as un-checked (not selected).
Although, at first, it may seem weird to have two similarly- and oppositely-named options ("Case-sensitive" and "Case-insensitive regex"), I think it makes sense. When you do a normal plain text search, having it start out case-insensitive is closer to the norm, so it's a good default. That is, I would think you'd want the option with the checkbox to symbolize the *optional* and *less usual* thing the user might want to do. You check the checkbox when you want to do more out-of-the-ordinary thing.
By the way, you might change the text of "Case sensitive" to "Case-sensitive", (with the hyphen) which I believe is more correct (see http://www.answers.com/topic/hyphen).
---John
On Fri, 11 Aug 2006 16:14:50 -0400, "John Gabriele" jmg3000@gmail.com wrote:
On 8/11/06, Nick Treleaven nick.treleaven@btinternet.com wrote:
On 11/08/06 15:21:46, John Gabriele wrote:
On 8/11/06, Nick Treleaven nick.treleaven@btinternet.com wrote:
[snip]
I think you don't have case sensitive checked ;-) So [A-Z] is the same as [a-z]. It works if you use case sensitive regexes.
Gah! Ouch. Missed that. Thanks.
Incidentally, in a previous thread (http://lists.uvena.de/pipermail/geany/2006-August/000358.html) I requested that, when the user clicks that "Use regular expressions"checkbox, that it might be a good idea to automatically select the "Case sensitive" option too, since users will be expecting that regexes start off case-sensitive by default. Nick, you mentioned you didn't think it's necessary, but I think it's kinda' funny that I was caught by it myself (embarrassingly, after previously bringing it up!). I will now train myself to always check that option whenever I select the regex option (since almost all of my regex searches are case sensitive), but if you think that the majority of your users will also have to train themselves like that, you might reconsider setting the option automatically. Principle of least surprise and all. :)
Well, the problem is twofold:
- It could be surprising that the case sensitive option becomes
checked when regexes are checked. 2. What to do when regexes are unchecked - unchecking case sensitive search could be surprising too.
I wonder about having a separate checkbox for regex case sensitive - this would seem to fix the above problems.
Well, if the checkboxes could be arranged to look hierarchically (so the one beneath "Use regular expressions" would be indented), I think it would look right.
If you went that route, I might suggest the following:
- The new option would be called "Case-insensitive regular
expressions", since the default (not selected checkbox) should be case-sensitive, IMO.
- When you select "Use regular expressions", "Case sensitive" gets
greyed out.
- When "Use regular expressions" is not selected, "Case-insensitive
regexes" is greyed out.
As usual with the other options, they'd remember the way you last had them checked, though I'd have the "Case-insensitive regexes" checkbox start off life as un-checked (not selected).
Although, at first, it may seem weird to have two similarly- and oppositely-named options ("Case-sensitive" and "Case-insensitive regex"), I think it makes sense. When you do a normal plain text search, having it start out case-insensitive is closer to the norm, so it's a good default. That is, I would think you'd want the option with the checkbox to symbolize the *optional* and *less usual* thing the user might want to do. You check the checkbox when you want to do more out-of-the-ordinary thing.
Do you really want a search(and replace) dialog where you _have_ to read any documentation before in order to be able to use it? Sorry, I think such a complicated dialog would more confuse than help. I want to leave the decision up to Nick.
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.key
On 8/11/06, Enrico Tröger enrico.troeger@uvena.de wrote:
[snip] Do you really want a search(and replace) dialog where you _have_ to read any documentation before in order to be able to use it?
If the right options were disabled/enabled during use, I don't see how it would complicate anything for the user. Though it would clutter the dialog box a bit.
Anyhow, I still prefer the idea of geany simply automatically checking the "Case sensitive" box when the user checks the "Use regular expressions" box -- no automatic unchecking involved. (Actually, I just noticed, this is similar to how NEdit does it, though NEdit seems to do something a little more complicated which I'm not sure I understand.)
Sorry, I think such a complicated dialog would more confuse than help.
Could be. But I did want to note in the earlier message how the current default of case-insensitive regexes was possibly disorienting to users (since it was to me).
---John
On Thu, 10 Aug 2006 12:40:27 -0400, "John Gabriele" jmg3000@gmail.com wrote:
Hi,
[snip]
- Added keyboard shortcuts for increase/decrease of line
indentation.
Hm. Previously I just used Tab and Shift-Tab. I now notice that there's an "Edit --> Format --> {Increase|Decrease} Indent" menu item. Using the Tab key seems sensible to me. Why add the Ctrl-I and Shift-Ctrl-I?
Also, I notice that if I select some block of text and use Tab/Shift-Tab, indent/de-dent works as expected, but fails with Ctrl-I/Shift-Ctrl-I (it only shifts one line -- not the whole selection).
It should work now in SVN. BTW another advantage for the additional Ctrl+I keybinding: if you have your cursor within a word on a line and you want to increase the indentation you have to go to the line start to do it by using TAB, with Ctrl+I you can do this everywhere within the line.
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.key