Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could the body pane automatically follow the selected node in the outline (as in Leo)? And support for unified outline&bodies tree/pane? #32

Closed
ar-jan opened this issue Apr 30, 2020 · 17 comments
Assignees
Labels
enhancement New feature or request

Comments

@ar-jan
Copy link

ar-jan commented Apr 30, 2020

An idea that has come up several times over the years on Leo's mailing list is the possibility to have a combined view of the outline and node bodies, with the body of each node rendered inline, and both headlines and node bodies being editable inside this unified tree.

A major advantage compared to the current situation is that this would make it possible to see the contents of the preceding and following nodes while working on a particular node's body. This would significantly reduce the need to keep track in your mind of what's what, and also allow you to scroll through a large document as with regular editors (while keeping Leo's advantages of organizing with nodes, clones, etc.).

Is this something that could be done in leointeg / VSCode?

@boltex
Copy link
Owner

boltex commented May 4, 2020

Hi @ar-jan !

Glad to hear more from you! 😄

I had to re-read your post 2-3 times because I'm having a hard time visualizing this,. (Your english is perfect - it's me whos a bit slow)

Could you do a quick mockup in mspaint or whatever just to illustrate if you feel like it?

For a part of an outline tree that's an @file/@clean... Would not that be just like viewing the derived file?

Still not quite sure I have the same picture in mind as you (and others) have, but As I see myself using leoInteg this will be rendered 'useless' in some kind of way...

For example: Let's say you have an outline on the far left (as I like to use Leo) on the right of it would be its body pane (for the currently selected node) and as another (3rd) panel, lets say right of body pane, would be the derived file I'm working on rendered by vscode in its usual way... Using the config setting feature of leoInteg to force the leoInteg to always accept to reload modified derived files, I can
then code at will by moving nodes, edit in body or edit in the derived file directly, (having ctrl+s update everything instantly simultaneously)

But I'm curious to learn more about this exact view-mode/feature you're suggesting here... if you're not enclined to make a quick sketch to illustrate it, perhaps you could point me to a forum post where it is also described textually - so another description would make me understand more precisely.

Anyways It sounds like a good idea and I'll try to consider it seriously as much as I can 'see' what a particular rendition of this feature would look like.

Thanks for this anyways! great suggestions and please make more if you have any other ideas for integrating your leo 'coding' workflow somehow into vscode, I'll try to make it happen if its doable!

--
Félix

@boltex boltex added the enhancement New feature or request label May 4, 2020
@boltex boltex self-assigned this May 4, 2020
@ar-jan
Copy link
Author

ar-jan commented May 5, 2020

Hi Félix, glad to hear you're open to ideas/suggestions!

First, here's two threads where this idea was discussed. I think there are more but I haven't found them yet.

You're right that it would be somewhat similar to editing a derived file. On a side note, is that possible already with leointeg, to edit a derived file and smoothly keep it in sync with Leo, in both directions?

Some differences with editing a derived file that would be useful:

  • Ability to see outline structure, create new nodes. I imagine with this feature you'd still want to use the Leo tree/outline for extensive reordering and promoting/demoting because you can see more nodes/headlines in one screen, but those operations might also be done in the unified tree.
  • Syntax coloring and maybe other editor features (like Leo abbreviations if those can be supported)
  • Option to collapse (sub)trees
  • Need for fewer panels (more space for e.g. other windows).

Not sure if I can create a mockup that'd be very helpful. But basically, it'd be a pane with the same structure and look as Leo outlines have currently, but beneath every headline would be the corresponding node body (editor body).

I hope that helps exlain the idea. I suppose it would not be trivial, after all it hasn't happened (yet) in Leo either. But imo it could be a killer feature, so worth a shot.

@boltex
Copy link
Owner

boltex commented May 6, 2020

Thanks! I'm very happy to get some feedback from people!

On a side note, is that possible already with leointeg, to edit a derived file and smoothly keep it in sync with Leo, in both directions?

Almost. I hope to finish full stability this month. (its kind of possible on the dev branch, if you make sure not to leave the body pane dirty before some critical operations, like undo, or detecting a derived file change- those are the last bugs i'm fixing right now)

Thanks also for those googlegroups posts, they're very interesting and the videos linked in them give a lot of good ideas for possible future features!

That being said, I dont think its possible to implement the original idea you proposed with the current 'tree view'of the vscode API. It might be possible with the code-folding features/API but I'm not familiar with it and that would be quite a project in itself!

Also, another feature that I might add, is a position tracking of body pane if another derived file containing it is opened. Just like previewing .md files in vscode keeps simultanous scrolling positions as you read and scroll through it. I just thought I'd mention this here because it would bring a look and feel not far from the original concept you proposed. (although still in 3 panels wide: outline, body and derived-file)

So thanks again and if there's anything you're trying with the dev branch that seems weird dont hesitate to ask me about it! :)

--
Félix

@ar-jan
Copy link
Author

ar-jan commented May 6, 2020

Looking forward to the stable version. I think this is a very exciting project for Leo users!

@boltex
Copy link
Owner

boltex commented May 30, 2020

On a side note, is that possible already with leointeg, to edit a derived file and smoothly keep it in sync with Leo, in both directions?

Hi @ar-jan !

I've got all that and more on the master branch for you to try now!

And if you're so enclined, I've even made a handy "Test-sheet" for you to use when you're trying out LeoInteg: https://docs.google.com/spreadsheets/d/1M7TA3J0hkBpU4BkyChThrhzwKxhTPtQHacXDYRvEQes/edit?usp=sharing

It's just a small grid of yellow checkboxes (from rows E to I) to help keep track of what features can be interacted with.

I hope you like it and also to get some feedback as you try it out! :)

Félix

Edit: Typo

@ar-jan
Copy link
Author

ar-jan commented May 30, 2020

Is there a way to clear all leointeg settings? I still can't get it to pick up my conda environment, and while trying to get this working by specifying the python command, I seem to have nuked the setting. Previously I could still edit Leo settings with the leobridge not working, but now the >leo ... commands do appear in the list, but don't do anything. In the current state, starting the leobridgeserver.py manually doesn't work either. I think I need to clear the custom python command configuration.

@ar-jan
Copy link
Author

ar-jan commented May 30, 2020

I didn't yet get to play with the editing of a derived file, but a few quick questions and/or wishlist items from the about one minute in which I had it working:

  • Can I customize keyboard bindings? I'm used to the Insert and Ctrl+Insert ones from Leo.
  • Could the body pane automatically follow the selected node in the outline (as in Leo)? This would be important for speed with keyboard-only navigation.
  • Is/will syntax highlighting be possible?
  • When I'd opened one Leo file, I didn't see a way to close the outline, or a way to open another outline. The ability to open multiple outlines (in separate tabs, I tink) would be useful.

Looking forward to trying it out more later!

@boltex
Copy link
Owner

boltex commented May 30, 2020

Thanks for your comments and input about this release!

Forgot to mention that I also updated the readme to include some more info to help starting up (and general updates and details about features and whatnot)

Is there a way to clear all leointeg settings?

Not sure what you mean by this: You can change setting for leoInteg easily by using the 'welcome/setting' screen. (open the command palette and start typing "leo settings") You have to wait 0.5 seconds after changing something for the 'auto-save' to kick in with the info-popup.,I should have mentionned that somewhere but I didnt...

You can verify that the settings were applied correctly by going to the regular vscode settings (Ctrl+,) click on the JSON view and see for yourself the settings (should be at the bottom if its the last settings that were created/modified)

You can also start the python script manually in a terminal by yourself, (if it can find Leo and websockets lib), and then start leoInteg Expansion. (I've made 3 different profiles in the debug panel to help with that.) Sorry that I don't know more about anaconda and the related issues. (in fact I know absolutely nothing about anaconda) I'm just using python the old usual way by 'installing it with the installer from their website' as an interpreter.

The server script is very small and simple so I hope to get the chance to learn more about this soon (python 'environments', anaconda, etc.) to fix issues for future versions which would hopefully start and run upon installation without any fiddling.

Can I customize keyboard bindings? I'm used to the Insert and Ctrl+Insert ones from Leo.

They're regular vscode commands custumizable the same way as any other :) Have a look at https://code.visualstudio.com/docs/getstarted/keybindings#_advanced-customization

Could the body pane automatically follow the selected node in the outline (as in Leo)? This would be important for speed with keyboard-only navigation.

...Working on it... Not made a specific issue on github yet, maybe I should!

Is/will syntax highlighting be possible?

Yes, It's on the official "coming soon" list! :) https://github.com/boltex/leointeg#intended-features

When I'd opened one Leo file, I didn't see a way to close the outline, or a way to open another outline. The ability to open multiple outlines (in separate tabs, I tink) would be useful.

That one is coming even sooner! Also I'm still pondering how to offer the choice of opened leo files to the user...(opening a menu through the satus bar or elsewhere...) Your suggestion of clicking to select an opened body for a specific opened leo file to 'switch' to it in the outline pane is a good idea! I'm taking note of this.

Looking forward to you reporting your efforts at trying all that stuff out man! Thanks a whole lot for your time and persistance to get it running and testing!

Félix

@ar-jan
Copy link
Author

ar-jan commented May 31, 2020

That all sounds great, thanks!

Re my Python issues:

You can change setting for leoInteg easily by using the 'welcome/setting' screen. (open the command palette and start typing "leo settings")

This only worked from a Leointeg-VSCode-window, and loading the settings/welcome screens stopped working there due to my experiments with alternative python invocations. I've now found the setting (leoIntegration.leoPythonCommand) in the JSON configs as you described so I can undo problematic configurations.

@boltex
Copy link
Owner

boltex commented May 31, 2020

This only worked from a Leointeg-VSCode-window,

Yes, this whole welcome / settings screen is a feature that I created and implemented and is part of the extension: so it's normal that you would not have access to is in a regular vscode window, although your regular settings file now contains those settings for leointeg. (and vscode might even highlight those entries as unknown entries because they are only relevant in the 'development/debug instance' of vscode while you run leointeg.)

Of course, in the near future, if I were to 'compile' the leointeg code into a real extension, put it on the microsoft vscode market for you to download and install as a regular extension, then all screens, settings and features would be available all the time in any vscode window.

Hope this makes sense :)

Thanks again for your testing, help and support!

Félix (edit:typos)

@boltex
Copy link
Owner

boltex commented Jun 11, 2020

I've added more explicit instructions and animated screen captures in the readme file along with a new 'CONTRIBUTING.md' file to give details on this development version installation and startup.

@boltex
Copy link
Owner

boltex commented Jul 5, 2020

@ar-jan your suggestion : "Could the body pane automatically follow the selected node in the outline (as in Leo)? This would be important for speed with keyboard-only navigation." is now issue #43 being worked on. 😄

@ar-jan
Copy link
Author

ar-jan commented Jul 5, 2020

Great! Love all the progress and plans you're making.

@edreamleo
Copy link
Collaborator

@boltex I'm not sure whether the original request is clear from the discussion. In any case, org mode uses a single window to represent the outline and the body.

@boltex
Copy link
Owner

boltex commented Jul 13, 2020

@ar-jan The issue #43 Could the body pane automatically follow the selected node in the outline (as in Leo) is now "fully" implemented on the "dev" branch. Is even now the default state of tree navigatoin and operation. (changeable to vscode's old behavior in leoInteg's options settings)

It will be part of the next 0.1.13 release.

Please take a look at it if you have spare time to check it out! thanks! (to see if you find inconsistencies/differences from Leo)

@boltex boltex changed the title Support for unified outline&bodies tree/pane? Could the body pane automatically follow the selected node in the outline (as in Leo)? And support for unified outline&bodies tree/pane? Jul 13, 2020
@boltex
Copy link
Owner

boltex commented Jul 13, 2020

@boltex
Copy link
Owner

boltex commented Oct 24, 2020

Closing this issue because the original question (combining headlines and body in an 'all in one' tree) is not in leoInteg's scope. Although all other great Ideas presented by @ar-jan have been implemented and are now on the 'dev' branch pending release in
0.14 ion the master branch (soonish).

Many thanks again to @ar-jan .

@boltex boltex closed this as completed Oct 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants