bhoov / vscode-manim

Simple commands to replicate the manim dev workflow in VSCode
MIT License
1 stars 1 forks source link

clipboard buffer + several improvements #5

Open VladimirFokow opened 1 day ago

VladimirFokow commented 1 day ago

Addresses #3, and also makes some improvements.

Added steps 1. and 3. Now the order is:

  1. Save clipboard to buffer
  2. Set clipboard to your selection, run the command
  3. After 0.5 sec – restore the original clipboard


Also added:

VladimirFokow commented 19 hours ago

By the way, on another branch –– I've added the run_scene command, BUT:

I'm thinking that that change is under CC-BY-NC-SA-4.0 license (so I haven't made a PR from that branch yet), because it's adapted from repo 3b1b/videos (license discussion)

Maybe this workflow can be re-written, to be free from that license? Although Grant is saying he's mainly worried about others using "videos, and the assets" and "directly using content" which I'm not doing here, but still bound by that license..

bhoov commented 10 hours ago

Neat stuff! I'm currently traveling and I won't be able to look into this until likely early next week, but thank you for the contribution!

Splines commented 9 hours ago

Wow, thanks for the quick implementation. The extension.ts file already gets quite large, maybe it'd be useful to extract the individual commands to separate files for better readability? Maybe there's also some shared behavior between commands that could also be outsourced?

VladimirFokow commented 9 hours ago

The extension.ts file already gets quite large

On the other hand, spreading things over different places will make it harder to follow each one.

extension.ts is straightforward - it just defines commands 1 by 1, and inside each command you just read linearly from top to bottom to understand 100% what it's doing.

Right now there isn't much overlap, there may be some shared parts in the future, in particular similar to here, e.g. send_terminus_command is used in several places: https://github.com/3b1b/videos/blob/master/sublime_custom_commands/manim_plugins.py

But after all, I don't have strong opinions - I'd support what's fastest for everyone involved.

Splines commented 9 hours ago

On the other hand, spreading things over different places will make it harder to follow each one.

I think quite the contrary is true ;) For me, it's easier to follow if the file is manageable and only contains of the things I need to look at (and no noise) — high cohesion, low coupling and separation of responsibilities. But maybe that's not too much of a problem yet in this early stage of the extension.

Of course, this is up to bhoov to decide in the end. I just think that it would make sense to watch out for this in the long-term run and to generally aim for high code quality right from the start to avoid aggregation of costs later on.