Hello!
My story is that I was trying to use LEO for my pet js project. Until it
was small - I could easily navigate the code and jump to methods with
SEARCH. Clones worked fine with textual projects but I failed to involve
them into programming activities. So after some time LEO become for me just
a programming notepad with some funny features.
Some more time elapsed and then I discovered that my code become ugly and
dirty. File for several thousands of lines of code, strange function names.
This is was a consequence of the LEO's features: 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).
Then I decided to move my project to VIM and made a huge refactoring
(actually beautifying) of all - so it can be possible to show the code to
another person w/o shame. Since then I dont use LEO for programming and use
it only for tasks where it is brilliant - textual, planning, ideas, brain
storming.

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. 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. 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.

Actually in advance - not too much. And both features can be scripted with
help of ctags - since it's very simple to integrate: one must call it
periodically and parse the output.
But... Where to place the result? We can make another tree (haha no), or
run into development of another gui control. I was trying to implement a
simple ui hack for highlighting a word under the cursor - it surprisingly
has been pretty hard, I cannot spend that much time for that. So currently
it's easier to use VIM. 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.

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

вс, 6 июн. 2021 г. в 23:48, [email protected] <[email protected]>:

> I looked up *ctags* so I have some idea about them now.  @gar, how do you
> picture their use?  There are a couple of existing Leo plugins that use
> ctags files.  Personally, the functionality like that I use the most is
> Leo's ability to jump to method defs.  I don't know how that's accomplished
> but it's a great feature of Leo.  I have thought of trying to get that
> capability into this Freewin plugin. The way I see it working is that you
> CNTL-click on a method invocation and a new Freewin window opens up for the
> node where the definition is.
>
> This would be way beyond the scope I had in mind originally, but it does
> seem like it could be delightfully useful.  I'm not sure how tricky it
> would be to implement.  If that is what you were thinking of, I could look
> into it.
>
> The thing is that I didn't devise these editing windows with programming
> in mind.  I mostly wanted to view so-called "zettelkasten" notecards - that
> is, small focused chunks of textual data.  So the windows don't do any
> syntax colorizing, and the way they are constructed I don't think that
> adding colorizing to the editing view would be very easy at all.  Another
> thing I could look into ...
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAC%2B8SVwsM24Zuw11B5VQ6nwZephRC3XzMSbL%3D%2BTxbzJmgQr2bQ%40mail.gmail.com.

Reply via email to