bhoov / vscode-manim

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

vscode-manim

Very simple VSCode extension for replicating Grant Sanderson's manim workflow for Sublime Text from this video

Note this extension is specifically for 3b1b's original manim library, NOT the community version.

Example usage

After installing:

  1. Open your manim scene.py in VSCode (replace scene.py with your manim file)
  2. In the attached terminal, run manimgl scene.py NAME_OF_SCENE -se 155 (replace 155 with line number to start debugging). In the upper-right of your screen the manim interactive video should pop up
  3. Highlight the "section" you want to run (In manim, a section is a comment (id) followed by a block of code )
  4. Type cmd+shift+p "Checkpoint paste from vscode-manim" ( or default binding cmd+' cmd+r ). This will copy the selected code to the clipboard and send the checkpoint_paste() command from manim into the interactive window.

The resulting workflow looks like Grant's 🥳

(see demo on youtube)

Recommended keyboard bindings:

Todo

Local Development

(mostly for my own future reference)

Make changes to src/extension.ts then

npm run compile
vsce package # `npm i -g vsce` if not already installed

Install locally: cmd+shift+p > "Extensions: Install from VSIX"

To publish, bump the version in package.json and

vsce publish