Re: highlight word under cursor

2020-12-21 Thread gar
I was thinking a little more about this problem and gathered the final
requirements in my head.
The following things can make me happy with Leo's HL:

1. when I place cursor on the word with mouse - every occurrence of this
word in the body editor is HLed. When I use navigation hotkeys to change
cursor position - HL is dropped while cursor is in motion, and when it is
stopped for a second or more - every occurrence is HL. The second part can
be dropped off - mouse is enough (since it looks kinda hard to implement)
2. Every match for F2/F3 and ctrl-shift-F in the body editor is HL too with
different color
3. ctrl-F3 triggers search forward for the word under cursor, ctrl-F2 -
backward (HL is performed, sure)
4. where is some hotkey to switch on/off for the persistent HL of the
selection or the word if nothing is selected; every buffer HLs matching
words with another color despite all other actions. This is useful when I
want to anchor some expression and see how it is used across buffers
around. Is a minor requirement too.

Thanks ;-)

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAC%2B8SVzjPwCXLS2r8QdvM_16w8pqr9s0hUqxf%2BDsxK2giMDBsw%40mail.gmail.com.


Re: lost my leo and much data with it

2020-12-21 Thread George Zipperlen
On Sunday, 20 December 2020 at 17:16:18 UTC-7 andyjim wrote:
>  Should take notes.  Is there a way I can get a history of terminal 
commands to see what I've done?

On the assumption that you are using bash as your shell,
you can set how far back in history it remembers with the

HISTSIZE environment variable in .profile, or .bashrc

$ man bash




Another trick is the script command to record all your keystrokes in a 
terminal session.  Can be a lot of cruft,
if you're using a curses based editor, but it's still filterable with unix 
tools...

$ man script

Very handy when you are using ssh to do something on a remote system.

On MacOS, I prefer Anaconda to homebrew for keeping different python 
environments from interfering with 
each other.  Once you get over the hump, virtual python environments are 
wonderful.   Allows me to run old
python2.7 or python3.5 scripts without porting...  Even keeps the 
appropriate qt versions working.
But I use homebrew for elixir, mutt, and a few other things.
-- 
George Zipperlen

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/f779e77b-0c7b-408f-8024-2a88669b419an%40googlegroups.com.


Re: highlight word under cursor

2020-12-21 Thread gar
Oh my, thanks a lot for such an immediate reaction. I didnt expect it and 
pleased a lot. Thanks.

I understand ... and I would add something.  To develop making good use of 
> some of Leo's strengths, I have found myself breaking up files into 
> subtrees, and nodes.  Each node usually only has a page's worth of code, 
> sometimes much less.  Their arrangement and names in the outline convey 
> quite a bit of information about the code flow.  Comparing this with 
> ordinary editors and IDEs, it seems to me that being able to highlight each 
> use of a word in a single node tends to be less useful in Leo, because so 
> much of the rest of the code will be in other nodes - and you won't be able 
> to see them at a glance anyway.
>

First of all, I am using breaking code into small pieces where just small 
part of code resides. That is the feature that prevents me from returning 
to vim in my everyday development - files seem too huge and clumsy for me 
now. Even if I ever return to vim of vscode or something - I would first 
find and install some outliner plugin. 
Second, I am familiar with leo's cff patterns. I don't see it's power and 
use it rarely. I use clones in another way: I am cloning nodes which are 
required for my current task, reducing their amount to 10-12 nodes. So I 
dont need to jump over the code and can remember what's going on in every 
part and can concentrate on the algorithm, not on the locations.
Third, Leo's refactoring tools are POOR. For now if I need to perform a 
refactoring - I am loading code to somewhere else (vscode, visual studion, 
vim - depends). Because leo's plain find'n'replace is a pain.
Ok, the preamble is done. Let's go further.
 

> This is where the clone-find-xxx commands can be useful.  All nodes with 
> the target word get cloned and placed in a new (usually temporary) subtree 
> outside of your working tree.  What is missing is a highlight of the target 
> word in each of these cloned nodes.  But I have found that you can jump to 
> and highlight each instance of the target word in a cloned node by pressing 
>  (since that word is already in the *find *buffer).
>
Cursor is jumping. You need to press keys. This breaks concentration. Most 
of time I just want to overview the field and decide - should I do anything 
with this particular variable. Or make another decision. When I just 
highlight occurrences - I am doing this faster. And better. Cause when 
you're F3 from one match to anohter - I are already dont remember what was 
2 steps before. And you're pressing F2. And doing pressings not thinking. 
 

> Before diving in to trying to implement highlighting a target word 
> everywhere in a node, a little more about the requirements would be 
> helpful.  For example, if you press any key, or click anywhere in the body, 
> should the highlighting go away?
>
 New word - new match. In the current body only. Highlighting is activated 
only by user action - shortcut or mouse click. When you're typing - nothing 
is going on.

If not, how should the highlighting be removed? 
>
 Highlighting  does not disappear if user does nothing.  Th criteria for 
removing hl - user enters text or mouse position changed. HL activates only 
by trigger.

Should Leo treat the original highlighted word differently from all the 
> other instances (e.g., having  delete only it)?
>
 yes, sure. HL is not a clone of the word in the body :-)

Some more thought now will pay off later, if someone undertakes to 
> implement this behavior.
>
  

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/ca5ded18-fe92-4f21-a051-837aca8f7db5n%40googlegroups.com.


Re: Clones - How To Return To "Original" Node?

2020-12-21 Thread Jacob Peck
“clone-find-parents” will show you all the parent nodes of that clone, which 
might be enough context?

“find-next-clone” seems to move to the next clone in the outline, but not 
necessarily the same clone you’re looking at.

“goto-next-clone” will cycle through all the clones of the selected node — 
seems closest to what you’re looking for.

Hope this helps!
—>Jake

> On Dec 21, 2020, at 10:30 PM, tbp1...@gmail.com  wrote:
> 
> 
> If I issue a command from the cff family, I will get a subtree of clones of 
> targets that have the search phrase.  After I look at several of them, I 
> sometimes want to go back to its matching clone, the one this new clone was 
> duplicated from.  I haven't found a convenient way to do this.  The 
> semi-convenient way I've found is to copy the clone's headline and then paste 
> it into the Nav pane to list its instances.
> 
> I suppose the action I'm thinking of would be clone-find-instances, although 
> perhaps the other instances of the clone could be marked so that I could go 
> to the next mark to get to where I want.
> 
> Is there some command or action that I'm overlooking here?
> -- 
> 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 leo-editor+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/leo-editor/f9d08401-1dbc-4d18-ab2f-99f74a85ac57n%40googlegroups.com.

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/8896F46D-4282-452D-B11E-4C5D0E3E5A25%40gmail.com.


Clones - How To Return To "Original" Node?

2020-12-21 Thread tbp1...@gmail.com
If I issue a command from the cff family, I will get a subtree of clones of 
targets that have the search phrase.  After I look at several of them, I 
sometimes want to go back to its matching clone, the one this new clone was 
duplicated from.  I haven't found a convenient way to do this.  The 
semi-convenient way I've found is to copy the clone's headline and then 
paste it into the Nav pane to list its instances.

I suppose the action I'm thinking of would be *clone-find-instances*, 
although perhaps the other instances of the clone could be marked so that I 
could go to the next mark to get to where I want.

Is there some command or action that I'm overlooking here?

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/f9d08401-1dbc-4d18-ab2f-99f74a85ac57n%40googlegroups.com.


Re: highlight word under cursor

2020-12-21 Thread tbp1...@gmail.com
I understand ... and I would add something.  To develop making good use of 
some of Leo's strengths, I have found myself breaking up files into 
subtrees, and nodes.  Each node usually only has a page's worth of code, 
sometimes much less.  Their arrangement and names in the outline convey 
quite a bit of information about the code flow.  Comparing this with 
ordinary editors and IDEs, it seems to me that being able to highlight each 
use of a word in a single node tends to be less useful in Leo, because so 
much of the rest of the code will be in other nodes - and you won't be able 
to see them at a glance anyway.

This is where the clone-find-xxx commands can be useful.  All nodes with 
the target word get cloned and placed in a new (usually temporary) subtree 
outside of your working tree.  What is missing is a highlight of the target 
word in each of these cloned nodes.  But I have found that you can jump to 
and highlight each instance of the target word in a cloned node by pressing 
 (since that word is already in the *find *buffer).

Before diving in to trying to implement highlighting a target word 
everywhere in a node, a little more about the requirements would be 
helpful.  For example, if you press any key, or click anywhere in the body, 
should the highlighting go away?  If not, how should the highlighting be 
removed?  Should Leo treat the original highlighted word differently from 
all the other instances (e.g., having  delete only it)?  Some more 
thought now will pay off later, if someone undertakes to implement this 
behavior.
On Monday, December 21, 2020 at 3:09:45 PM UTC-5 gar wrote:

> Do you want all matching words highlighted every time you highlight a word?
>
> By default - yes. An I would lovу if  every match is highlighted every 
> time I use find / findall
>
> If I could  on a word and get them all highlighted, I'd 
>> probably like that.
>>
> This would please me too. ANY approach would be fine. But I got none :-) 
>

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/51e6d793-f181-471c-a16b-fdb35e22a7een%40googlegroups.com.


Re: highlight word under cursor

2020-12-21 Thread gar

>
> Do you want all matching words highlighted every time you highlight a word?

By default - yes. An I would lovу if  every match is highlighted every time 
I use find / findall

If I could  on a word and get them all highlighted, I'd probably 
> like that.
>
This would please me too. ANY approach would be fine. But I got none :-) 

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/05f0f181-6a8a-4c27-ad5e-35e090be827cn%40googlegroups.com.


Re: highlight word under cursor

2020-12-21 Thread tbp1...@gmail.com
Do you want all matching words highlighted every time you highlight a 
word?  That's what annoys me.  Say I want to delete a word.  I will 
highlight it then press DELETE or .  I dislike all matching words 
flashing with a highlight and then flashing off as I do the 
mark-and-delete.  If I could  on a word and get them all 
highlighted, I'd probably like that.

On Monday, December 21, 2020 at 2:45:20 PM UTC-5 gar wrote:

> yeah, thanks, I know about it. But it is different and not suffice.
> When word is highlighted - you can easily see where and how variable
> is used. This simplifies refactoring and analysis.
> Actually I cannot work on reasonable large codebases without it. The
> project I started when knew about leo - became large enough so I can
> develop it in leo w/o some features of it's IDE brothers.
>
> 2020-12-21 22:23 GMT+03:00, tbp1...@gmail.com :
> > I have got this feature in some editors, but I usually find it to be
> > annoying. I prefer to move from one instance to the next with  or
> >  or one of those standard shortcuts.
> >
> > In Leo, the NAV pane can search a node or file - of course you have to 
> type
> >
> > or paste the phrase in - and gives you a list of hits in context that you
> > can click on to get taken to its line. I like this feature very much. Not
> >
> > quite what you asked for but useful.
> >
> > On Monday, December 21, 2020 at 11:21:46 AM UTC-5 gar wrote:
> >
> >> I was not correct in expressing what I need. I am actually missing such 
> a
> >>
> >> function like: when cursor is on the word - every word equal to this in
> >> the
> >> buffer is somehow highlighted
> >> (https://images.app.goo.gl/Nb6NYHxcavNnbMfD6
> >> ).
> >> extend-to-word is a good command, but does slightly another thing.
> >>
> >> ctrl-click works with python only and like a simple searcher. I am 
> talking
> >>
> >> about some sort of AI which parses code and keeps symbols db (look at
> >> YouCompleteMe for example).
> >> This feature makes powerful text editor the IDE.
> >>
> >
> > --
> > 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 leo-editor+...@googlegroups.com.
> > To view this discussion on the web visit
> > 
> https://groups.google.com/d/msgid/leo-editor/8b347406-abfa-499d-bd30-ef0f4202830bn%40googlegroups.com
> .
> >
>

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/f7c38c32-0169-4156-a1e0-f662287b3687n%40googlegroups.com.


Re: highlight word under cursor

2020-12-21 Thread gar
yeah, thanks, I know about it. But it is different and not suffice.
When word is highlighted - you can easily see where and how variable
is used. This simplifies refactoring and analysis.
Actually I cannot work on reasonable large codebases without it. The
project I started when knew about leo - became large enough so I can
develop it in leo w/o some features of it's IDE brothers.

2020-12-21 22:23 GMT+03:00, tbp1...@gmail.com :
> I have got this feature in some editors, but I usually find it to be
> annoying.  I prefer to move from one instance to the next with  or
>  or one of those standard shortcuts.
>
> In Leo, the NAV pane can search a node or file - of course you have to type
>
> or paste the phrase in - and gives you a list of hits in context that you
> can click on to get taken to its line.  I like this feature very much.  Not
>
> quite what you asked for but useful.
>
> On Monday, December 21, 2020 at 11:21:46 AM UTC-5 gar wrote:
>
>> I was not correct in expressing what I need. I am actually missing such a
>>
>> function like: when cursor is on the word - every word equal to this in
>> the
>> buffer is somehow highlighted
>> (https://images.app.goo.gl/Nb6NYHxcavNnbMfD6
>> ).
>> extend-to-word is a good command, but does slightly another thing.
>>
>> ctrl-click works with python only and like a simple searcher. I am talking
>>
>> about some sort of AI which parses code and keeps symbols db (look at
>> YouCompleteMe for example).
>> This feature makes powerful text editor the IDE.
>>
>
> --
> 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 leo-editor+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/8b347406-abfa-499d-bd30-ef0f4202830bn%40googlegroups.com.
>

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAC%2B8SVwTY7kkoKotfayf%3DTReJjBrmpGWzg3jF%2BgRAWLwrLW-%2BA%40mail.gmail.com.


Re: highlight word under cursor

2020-12-21 Thread tbp1...@gmail.com
I have got this feature in some editors, but I usually find it to be 
annoying.  I prefer to move from one instance to the next with  or 
 or one of those standard shortcuts.

In Leo, the NAV pane can search a node or file - of course you have to type 
or paste the phrase in - and gives you a list of hits in context that you 
can click on to get taken to its line.  I like this feature very much.  Not 
quite what you asked for but useful.

On Monday, December 21, 2020 at 11:21:46 AM UTC-5 gar wrote:

> I was not correct in expressing what I need. I am actually missing such a 
> function like: when cursor is on the word - every word equal to this in the 
> buffer is somehow highlighted (https://images.app.goo.gl/Nb6NYHxcavNnbMfD6
> ).
> extend-to-word is a good command, but does slightly another thing.
>
> ctrl-click works with python only and like a simple searcher. I am talking 
> about some sort of AI which parses code and keeps symbols db (look at 
> YouCompleteMe for example).
> This feature makes powerful text editor the IDE.
>

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/8b347406-abfa-499d-bd30-ef0f4202830bn%40googlegroups.com.


Re: highlight word under cursor

2020-12-21 Thread gar
I was not correct in expressing what I need. I am actually missing such a
function like: when cursor is on the word - every word equal to this in the
buffer is somehow highlighted (https://images.app.goo.gl/Nb6NYHxcavNnbMfD6).
extend-to-word is a good command, but does slightly another thing.

ctrl-click works with python only and like a simple searcher. I am talking
about some sort of AI which parses code and keeps symbols db (look at
YouCompleteMe for example).
This feature makes powerful text editor the IDE.

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAC%2B8SVw8%3Dq-MvdjHi3Kswnf6g9czyWVTR4L8Dq%2BOt-5kK92WHw%40mail.gmail.com.


Re: highlight word under cursor

2020-12-21 Thread Edward K. Ream
On Mon, Dec 21, 2020 at 2:25 AM gar  wrote:

is there an opportunity to highlight all the word under the cursor in the
> current active editor (placing cursor forces editor to highlight all the
> occurences of the word in the buffer)?


extend-to-word

g.isWordChar and g.isWordChar1 define what a word means. Scripts or plugins
can change this as desired.

Finally, ctrl-clicking in any part of a word will find the first definition
of a class, method or function with that name. After that, a cff will find
all such definitions.

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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS3XRBcRvaGFBaBegVevnVjokHDV3cZJg91arG-h%2BkX8Gg%40mail.gmail.com.


Re: lost my leo and much data with it

2020-12-21 Thread Edward K. Ream
On Sun, Dec 20, 2020 at 6:16 PM andyjim  wrote:

Should take notes.
>

Yes. Get in the habit for all installation-related stuff.

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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS0evWALw7WTVXR4ZmxXiWTusWBtUzJ5QrCMjzA0W18MAw%40mail.gmail.com.


highlight word under cursor

2020-12-21 Thread gar
is there an opportunity to highlight all the word under the cursor in the 
current active editor (placing cursor forces editor to highlight all the 
occurences of the word in the buffer)?
this is very useful for code analysis.

and did anyone try to tie code completion server with Leo (the simplest 
example - to make ctags and leo completer work together)?

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/5b369a44-0571-455e-833d-9322d9f6bd6an%40googlegroups.com.