This is wonderful work Edward. Find related features are crucially 
important to an efficient and effective workflow. I've also been working to 
improve Leo's workflow through a new find-related plugin. It is called 
quick-replace (in the vein as many other quick-* named plugins) but it's 
really a tool for refactoring code quickly. 

It offers a greater level of outline-tree granularity than Leo's standard 
find/replace and also more seamlessly blends with your workflow, keeping 
your eyes and fingers near the code/keyboard. It supports a find/replace 
history with quick ways to recall previous actions. It also implements a 
favorites feature which will be a growing user-editable list of named 
find/replace patterns you can quickly search through to perform common 
refactoring and code cleaning (for example either removing or adding spaces 
around operators). 100% keyboard-only friendly.

It's not done yet and work/family has been kicking my butt lately so I 
haven't had time to finish/test it. I would like to release it within the 
next several weeks, but could be a month.

On Tuesday, June 30, 2015 at 12:10:08 PM UTC-4, Edward K. Ream wrote:
>
> This post discusses Leo's find commands and their relation to clones and 
> workflow.  All comments & questions welcome.
>
> *Executive summary*:
>
> - Programming is *almost all about* finding definitions of classes, defs 
> and vars!
> - Leo's clones may have impeded workflow by making find commands more 
> cumbersome.
> - The new @bool find-ignores-duplicates setting is a corrective step.
> - New find-related features "just work" without most people being aware of 
> them.
>
> *How did we ever live without find-def & find-var?*
>
> As I was developing find-def my attention was drawn to how many times I 
> could have used it. Almost all finds I do could be done with find-def or 
> find-var! This was shocking.
>
> Although find-def and find-var a just a *little *more convenient to use, 
> the payoff is significant because:
>
> - find-def and find-var start at the start of the outline.  No need to 
> select a starting point.
> - find-def and find-var automatically do word searches, and add "def" or 
> "class" or " =" as needed.
> - With @bool find-ignores-duplicates = True, *clones no longer slow down 
> searches*!
>
> Still to do: ctrl-clicking a word could be a synonym for find-def.
>
> *Clones are more useful, and more optional*
>
> Clones allow me to avoid finds entirely.  The idea is to gather nodes 
> together so that I don't *have *to search.  Having said that, being able 
> to find a definition just by placing the cursor on a symbol creates a new 
> workflow that doesn't depend on clones.  It quickly becomes second nature.
>
> *Benign hidden modes & related hacks*
>
> Initial versions of the code tried to do the work of finding *all* 
> definitions in the find-def command itself.  Sharing the work between 
> find-def and find-next collapsed the complexity of the code.  In effect, 
> various find-related ivars create a *hidden mode* that exists from the 
> time the find-def command starts until find-next fails.  Imo, this mode is 
> completely benign.  It "just works" without the user being aware that 
> anything unusual is happening.
>
> One side effect of using find-def so often was that I often used F3 "by 
> mistake" after Ctrl-F.  Now, Leo supports the key bindings for the 
> following commands after hitting Ctrl-F: find-def, find-next, find-prev, 
> find-var. This hack will make Leo work more smoothly without anyone 
> noticing.
>
> *Initing Find commands*
>
> Ctrl-F (start-search) inits the find pattern to the selected text or the 
> word under the cursor.  This behaviour could be called an instance of DWIM: 
> Do What I Mean.  It quickly becomes second nature, and is much more 
> convenient than cutting and pasting text into the find pattern.
>
> *Summary*
>
> The new find code improves Leo's workflow in subtle but significant ways.
>
> The find-def and find-var commands are simple minded, but in practice they 
> work well.
>
> The present work already works much better with clones, assuming @bool 
> find-ignores-duplicates = True.
>
> More experimentation will show whether further improvements are possible.
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to