[Geany] search & replace

spir denis.spir at xxxxx
Mon Nov 23 18:19:47 UTC 2009


Hello,

Here are 3 points to improve (imo) the search & replace tool in geany.

-1- whole words
The current "match whole word only" setting fails if the searched expression is not a word at all. What I would expect is that it requires whole word(s) only for the part(s) of the expression that are words -- according to the definition of word characters in the filetype config.
Meaning that looking for "+" would not fail only because "match whole word only" is checked, because this setting is irrelevant for this expression. Searching for " = name" could succeed with this option set as expected, but fail on " =  names". Am I clear?
The current behaviour leads to constantly uncheck this option when irrelevant, which may be dangerous for next search & replace, each time we forget to set it back.

-2- record settings
The common settings we use (for me: escape sequence, case sensitive, whole word only, not close dialog) are not recorded between sessions and cannot be set in preferences. As a consequence, we need to redefine the dialog for each working session -- and again some missing or error may be dangerous. Would it be possibly to add these settings to the "search" frame in preferences?

-3- comments & strings
A very common task when improving, extending or refactoring code is renaming -- if only for clarity. Too often we'll have to search & replace words that are "key words" for the application, so that they may happen in comments and even in strings. Depending on the case we want the replacement to extend comments and string -- or not at all!
Unnoticed and unintended replacements commonly lead to funny but meaningless comments or unpredictable issues because of string changes. A pair of settings to address this point would be great.

Denis





________________________________

la vita e estrany

http://spir.wikidot.com/





More information about the Users mailing list