On Monday, June 7, 2021 at 3:02:36 AM UTC-4 gar wrote:

> when your organize code with sections (like LEO's nodes) and navigate with 
> search only - you dont see your code and it become's like LEO's code itself 
> (take a look into original source in a plain text editor - and you'll get 
> surprised: it's not maintainable w/o LEO).
>

This can be a real problem, all right.  But it's not all bad.  There is a 
lot of advice out there to make function/method bodies only one screen 
long.  This can lead to creating a lot of functions just for the purpose of 
breaking up the code.  For each one, you have to pass parameters, often 
many, or use global parameters (or at least, global to the module or unit 
you are working in).  With Leo at least you can break up the code into 
screen-sized chunks without being forced to create function calls that 
would not be needed otherwise.

But
 | so it can be possible to show the code to another person w/o shame. 

Yes, that can be a real problem. when the other person doesn't use Leo.  At 
the very least, you would need to save as @clean instead of @file.  I have 
not brought one of my (professional) projects into Leo just for that 
reason.  OTOH, a big project in, let's say, Visual Studio, is basically 
unusable by someone who only uses Eclipse, and vice-versa.  It's just that 
many more people use those tools than use Leo.

And in parrallel I was thinking - what should I get in LEO to return 
> (implicitely - my code must be same clean and pretty as it is in VIM). And 
> think that those things are:
> - I need to see the overall picture of the file. Since in node I even 
> dont know which _real_ line of code I edit - I loose any feedback from the 
> code and operate only with nodes, which itself leads to ugliness. 
>

I don't seem to feel this particular problem.  Even using a normal text 
editor, say, with different files open in different tabs, I don't really 
know where things are in a bigger project.  I get more help than hindrance 
from Leo's node structure.  Anyway, with some discipline one could follow a 
one node-one function rule and then the organization would be like it would 
be with some other IDE.
 

> Here method's map can help. In VIM I get it with CTAGS and language 
> servers.
> - I need a simple method to navigate the project. Say I press ctrl-] - and 
> go to the place where the method under the cursor is defined.
>

Leo has CTRL-CLICK for the same purpose.  If it were an ordinary command it 
could be linked to a hotkey so the mouse wouldn't be needed.  But so far I 
haven't been able to find it in the code base. possibly because I haven't 
thought of the right search phrase.  If @Edward is reading this, maybe he 
would point me to it.  So Leo itself doesn't seem to need ctags, since 
somehow it is doing that job for itself already.
 

> Search also works, but when you operate nodes - this leads to strange side 
> effects in my particular case. Also I need ctrl-o to move back to the place 
> I navigated from. Yes, I need navigation history! I wrote a bunch of my own 
> ugly commands for that - but they do it not exactly in the way other IDEs 
> do. This feature also can be implemented with CTAGS or with language server.
>

Leo has those forward-backward arrow buttons for navigation history.  I use 
them a lot.  I presume they could be bound to hot keys.  Otherwise, I bind 
a hot key (F4) to move to the next marked node.  I use that a lot.  I bind 
F9 to set a mark.  I borrowed the F9/F4 from Editplus, where I found they 
were a major help.  (I use F10 to clear all marks.)  Actually, EditPlus 
uses F9 to toggle a mark, not just to set it, and I think that's more 
useful.  Maybe I will look at writing a small command to do that.
 

> But I still hope that I'll find the way to get what I want w/o much GUIing.
> Your work looked reasonably suitable for that, so I asked.
>

I created the Freewin plugin so that I could continue to look at the 
content of several nodes at the same time while I navigated away from them 
in the tree. with the editing ability thrown in as a bonus.  An extra 
benefit is that you get a clean view of a node's content with minimal 
distractions.  But the viewing window is not a real Leo body editor.  I 
don't know if one could open one of those in a free-floating window - not 
the current free-splitter arrangement, that doesn't do what I want.  If 
that were possible, then you would presumably get all of the body pane's 
features without any extra work.  That plus some well-selected hot key 
bindings would get you most of the way, perhaps.
 

> Thanks for the interest. Hope your were not too bored reading this :-)
>

:) 

-- 
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/d3e098a7-41c7-4c8f-8552-c5270446b58en%40googlegroups.com.

Reply via email to