Allright: leointeg 'dev' branch now updated for leo's 'devel'

41 views
Skip to first unread message

Félix

unread,
Jun 13, 2021, 2:55:49 AM6/13/21
to leo-editor
leointeg 'dev' branch now updated for leo's 'devel'

Switch to the dev branch, run 'npm install' in the terminal to update dependencies and try it out ! 

Option replaced in the 'Settings' now about leo's home folder.

Automatically finds /leo/core/leoserver.py ! yay!

As a bonus, leointeg now will try more ports if the current default port, or  the one specified   in leointeg's settings,  is in use when starting a server. 

So it's not bound to a single fixed the port nor a single instance - multiple vscode window will use subsequent ports/servers (up to 5 more for now)

as a silly debugging tool/switch, i made it so that if leobridgeserver.py (with the old name) is present in /leo/core then it will use it for easy switching / testing  purposes until leoserver.py is finished being rewritten correctly. It's temporary obviously.

Many thanks to Thomas for his systematic approach and perseverance in pointing out all the stuff that didn't go smoothly on a typical machine for a 'new' leointeg user! This is most valuable input that really helps things move forward! 🦁

leointeg now activates after the vscode window's ready event instead of checking if there's a leo fine in the workspace or being switched to the 'Leo' view in the activity bar. 
--
Félix

Edward K. Ream

unread,
Jun 13, 2021, 6:57:30 AM6/13/21
to leo-editor
On Sun, Jun 13, 2021 at 1:55 AM Félix <felix...@gmail.com> wrote:

leointeg 'dev' branch now updated for leo's 'devel'

Switch to the dev branch, run 'npm install' in the terminal to update dependencies and try it out ! 

Works great. Everything "just works" after I changed the path to "leo-editor". Good work!

BTW, not using a custom ExternalFilesController class in leoserver.py may explain some problems I had syncing leoserver.py when using both leoInteg and Leo.  For sure I don't understand some things that I should :-)

Edward

tbp1...@gmail.com

unread,
Jun 16, 2021, 1:48:57 PM6/16/21
to leo-editor
I've updated and played a little.  Everything seemed to work as expected.

One question - about handling of keystrokes that mean something in Leo, such as CNTL-B.  Do you think there could be a way to get some of them to work as expected from within the leointeg environment?  Of course, there is the potential for interference with native vsc key shortcuts.

Edward K. Ream

unread,
Jun 16, 2021, 3:42:15 PM6/16/21
to leo-editor
On Wed, Jun 16, 2021 at 12:49 PM tbp1...@gmail.com <tbp1...@gmail.com> wrote:
I've updated and played a little.  Everything seemed to work as expected.

One question - about handling of keystrokes that mean something in Leo, such as CNTL-B.  Do you think there could be a way to get some of them to work as expected from within the leointeg environment?  Of course, there is the potential for interference with native vsc key shortcuts.

I can answer this one. Félix may have more details. vs-code (and thus leoInteg) has superb key-binding features, of which Félix has taken full advantage.

In the vs-code command palette (Shift-Ctrl-P), type "short". You will see an entry: "Preferences, Open Keyboard Shortcuts". Select that command, and type the (Leo) command you want to bind to.  It's dead simple.

Edward

Edward K. Ream

unread,
Jun 16, 2021, 3:51:19 PM6/16/21
to leo-editor
On Wednesday, June 16, 2021 at 2:42:15 PM UTC-5 Edward K. Ream wrote:

One question - about handling of keystrokes that mean something in Leo, such as CNTL-B.  Do you think there could be a way to get some of them to work as expected from within the leointeg environment?  Of course, there is the potential for interference with native vsc key shortcuts.

I can answer this one. Félix may have more details. vs-code (and thus leoInteg) has superb key-binding features, of which Félix has taken full advantage.

In the vs-code command palette (Shift-Ctrl-P), type "short". You will see an entry: "Preferences, Open Keyboard Shortcuts". Select that command, and type the (Leo) command you want to bind to.  It's dead simple.

I should add that right now you should do F5 (or Ctrl-F5) first, so that vs-code knows about Leo commands. After that, you can just type "leo" in the "Keyboards Shortcuts" to see all of Leo's commands, and make any bindings you like.

Notes:

1. vs-code will tell you about conflicting shortcuts.
2. leoInteg's shortcuts apply only when focus in a Leo pane. Otherwise, default vs-code shortcuts apply.

In short, vs-code's key binding capabilities are miles ahead of Leo's, and Félix has ensured that Leo's bindings don't conflict unnecessarily with vs-code's default bindings.

Edward
Reply all
Reply to author
Forward
0 new messages