how about a Select Scope fucntion that allows you to select the current scope, and then you can do "In selection"<br clear="all">/ˈmɪstər/ /ˈdʒɛnəsɪs/@/dʒi/ /meɪl/ /dɒt/ /kɒm/<br>Benjamin West<br><br>
<br><br><div class="gmail_quote">On Sun, Jan 18, 2009 at 4:50 AM, Enrico Tröger <span dir="ltr"><<a href="mailto:enrico.troeger@uvena.de">enrico.troeger@uvena.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">On Sun, 18 Jan 2009 02:17:42 +0100, spir <<a href="mailto:denis.spir@free.fr">denis.spir@free.fr</a>> wrote:<br>
<br>
<br>
>> > >-3- I would add a "replace all in current scope" function that I<br>
>> > >dream of for years already ;-) where 'scope' means closest<br>
>> > >nesting func, class, or whatever.<br>
>> ><br>
>> > Hmm, not sure. Could be done but adds yet another button, yet<br>
>> > another thing you need to sort out when you do a quick<br>
>> > search/replace. (this is not a 'no', just a 'I won't work on it')<br>
>[...]<br>
>> "In Scope"<br>
>> sounds interesting, but I think it would be too complicated<br>
>> practically to be added alongside the other find/replace modes. My<br>
>> misgivings:<br>
>><br>
>> 1. Would it work reliably/predictably, even in cases of complex C++<br>
>> code and the like?<br>
>><br>
>> 2. What, exactly, does "scope" mean? Body of the current<br>
>> function/method? (Would it include the signature line, so you can<br>
>> find/replace the formal parameters too?)<br>
><br>
>Yes, I meant that. Precisely, as a formal parameter (name) is a local<br>
>variable (name), I find practicle to be able to "replace all" in the<br>
>scope of the name life. Namely (sic!) a namespace is imo the proper<br>
>scope of a "replace all" feature in many cases, if not most. So that<br>
>when writing "in scope" I rather meant "in the extent of the current<br>
>code section that defines a namespace".<br>
> What about just the current curly-brace block, which<br>
>>    would also have a claim to the term "scope?" Or the current<br>
>> class? Would there be a preference to decide between these, or would<br>
>> it be something set by the language syntax driver?<br>
><br>
>The note above basically excludes lower level code blocks such as<br>
>loops or ifs. Anyway, this seems mostly useful for funcs/methods and<br>
>it would apply on a whole class only when one points at a line at<br>
>class top-level. An alternative may be to define this at per-language<br>
>level inside language specific config files, so that there would be<br>
>both a geany default and possible user preference.<br>
<br>
</div></div>Hmm, first this is going a bit off-topic and far beyond the original<br>
request.<br>
I don't think we need this in the core of Geany, could be done as a<br>
plugin, maybe.<br>
But per filetype scope settings just for 'Replace All' sounds heavy to<br>
me, sorry.<br>
<br>
Anyway, we already have some code to find the scope at the cursor<br>
position and the found scope is displayed in the statusbar. Anyway,<br>
it's known that this value is not always accurate and not that<br>
reliable. Especially for PHP files and maybe others.<br>
<div><div></div><div class="Wj3C7c"><br>
Regards,<br>
Enrico<br>
<br>
--<br>
Get my GPG key from <a href="http://www.uvena.de/pub.asc" target="_blank">http://www.uvena.de/pub.asc</a><br>
</div></div><br>_______________________________________________<br>
Geany mailing list<br>
<a href="mailto:Geany@uvena.de">Geany@uvena.de</a><br>
<a href="http://lists.uvena.de/cgi-bin/mailman/listinfo/geany" target="_blank">http://lists.uvena.de/cgi-bin/mailman/listinfo/geany</a><br>
<br></blockquote></div><br>