Manim-Notebook / manim-notebook

Manim with interactive previewing in VSCode. [Currently in its alpha stage.]
MIT License
10 stars 1 forks source link

Add shortcut "Execute cell and move to next cell" #62

Open bhoov opened 1 month ago

bhoov commented 1 month ago

To replicate the familiarity of a Jupyter Notebook, a common workflow is to execute a cell and move the cursor to the next cell. This will allow a user to quickly run consecutive cells in a file and build a scene cell-by-cell without manually navigating in the file.

Recommended shortcut key, cmd+' cmd+'.

Or, perhaps even better, swap the shortcut the "Preview Cell" command to cmd+' cmd+' and make this "execute and move" command be cmd+' cmd+e

VladimirFokow commented 1 month ago

can we do even easier? - cmd+Enter 😃

(or either:

This could be the one command without the cmd+' prefix.

bhoov commented 1 month ago

Those hotkeys would clash with my jupyter extension hotkeys for the same functionality :/. Is there an intuitive fix for a python script that uses both ipython cells #%% and manim cells ##?

VladimirFokow commented 1 month ago

hm.. I guess the user can always change the shortcuts. Then disregard my prev. message. I didn't take your use-case into account

Splines commented 2 weeks ago

Those hotkeys would clash with my jupyter extension hotkeys for the same functionality :/

I don't see how Shift + Enter or Ctrl/Cmd + Enter would clash. The Jupyter Notebook extension will not detect our Manim Cell as a Jupyter cell, right? And vice versa. And in VSCode it's possible to use the same shortcut for multiple commands.

If Jupyter cells and Manim cells are mixed in the same file and somehow this doesn't work out, we could in addition easily introduce a new context that can be used for our keyboard shortcut in a when clause.