[Geany] Regex replace weirdness

Lex Trotman elextr at xxxxx
Wed Sep 29 03:40:50 UTC 2010


On 29 September 2010 12:59, Erik de Castro Lopo <mle+tools at mega-nerd.com> wrote:
> Erik de Castro Lopo wrote:
>
>> Lex Trotman wrote:
>>
>> > So I would say that the current behavior IS correct,
>>
>> Except that its counter intuitive and different from the behaviour
>> of existing text editors like Nedit and Vim (:%s/^ //g).
>
> In fact, Vim says its search and replace should do the same as sed:
>
>    http://www.felixgers.de/teaching/emacs/vi_search_replace.html

If you actually look at the VIM manual
http://vimdoc.sourceforge.net/htmldoc/usr_10.html#10.2 you find that
the substitute command operates on a line by line basis like sed.  So
the g option searches the line, substitutes all the matches and then
goes on to the next line.

Geany doesn't have a substitute command and doesn't work line by line,
it repeats find/replace.

Perhaps, as you say, it should offer a substitute command that works
line by line as well, but "someone has to do it" (tm) and "patches are
welcome" (tm) (that right Frank ;-).

Cheers
Lex

>
> Erik
> --
> ----------------------------------------------------------------------
> Erik de Castro Lopo
> http://www.mega-nerd.com/
> _______________________________________________
> Geany mailing list
> Geany at uvena.de
> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
>



More information about the Users mailing list