As near as I can tell, this old thread from Sep2009 is the clearest
discussion on how search and replace in Leo is supposed to work. Yet
when I followed the directions no text was changed. Anyway, after some
bumping around in the dark I finally discovered the complete recipe,
which I think should be added to the docs[*]:

Interactively
========

Press [Ctrl-F], type text to search for, [enter]
Press [Crtl-Shift-R], type text to replace with, [enter]
...text-to-find should be selected and highlighted in the body pane
Press [Ctrl -] (control-dash)
...selected text should now be replaced,and the next occurrence of
text-to-find selected

Rinse, lather, repeat.

All at once
========

Open [Find] tab
....ignore Find and Change fields
...but pay special attention to "Suboutline only" and "Entire outline"
radio buttons. You don't want to replace occurrences in the whole leo
file by mistake!
click somewhere in the tree or body pane and:

Press [Alt-X]
...keyboard focus should now be in mini-buffer at bottom
Type 'change-all' [enter]    # tab completion is available in the minibuf
Type text-to-find [enter]
Type replacement-text [enter]

cheers,

-matt
[*] actually I think the S&R feature is too awkward and should be
overhauled, but I know how to write docs and don't know how to code
so... :)


On Mon, Sep 7, 2009 at 8:22 AM, Edward K. Ream <[email protected]> wrote:
>
> On Mon, Aug 31, 2009 at 12:25 PM, qt02537 <[email protected]> wrote:
>>
>> I'm using Leo 4.4.3.1 on Windows, and I'm having trouble with a simple
>> "find and replace" command.  I do the following steps:
>>
>> - hit Ctrl-F to bring up the Find dialog
>> - in the Find text box,I enter the text find
>> - in the Change text box, I enter the text to change it to
>>
>> There is no button like "Execute" or "Ok" to press--what do I do at
>> this point to effect the "Change and Replace"?
>
> This won't work.  You must use the minibuffer find/change.
>
> Ctrl-f puts focus in the minibuffer and shows the find tab.
> To do a find, type the search string and hit return.
> To do a search and replace, type the search string, type ctrl-shift-R, type
> the replace string then type return.
>
> For more help, do apropos-find-commands.

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to