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.
manimgl
works in your terminalscene.py
) in VSCodeconstruct
method in a scene classcmd+shift+p
-> Manim Notebook: Start scene at cursor
manimgl scene.py NAME_OF_SCENE -se <lineNumber>
in your terminal)Then you can do either:
Write some comments which start with: ##
.
The clickable "Preview Manim Cell" buttons will appear above each such comment.
Clicking on one will run it.
It is equivalent to: cmd+shift+p
-> Manim Notebook: Preview active Manim Cell
Place your cursor on some line (or highlight several lines),
cmd+shift+p
-> Manim Notebook: Preview selected Manim code
This will run the selected lines.
You can use the default keyboard shortcuts for these commands, or assign your own.
cmd+'
cmd
or ctrl
depending on your OSAll current commands are:
Manim Notebook: Start scene at cursor
.cmd+' cmd+s
Manim Notebook: Preview active Manim Cell
.cmd+' cmd+e
Manim Notebook: Preview selected Manim code
.cmd+' cmd+r
Manim Notebook: Remove all objects from scene
.cmd+' cmd+c
Manim Notebook: Quit preview
.cmd+' cmd+w
The resulting workflow can look like Grant's 🥳
Ctrl/Cmd + ,
in order to open the settings and search for Manim Notebook
.settings.json
file as described here in the VSCode docs. Why not go for a more red-ish color? 🎨// https://stackoverflow.com/a/71962342/
// https://stackoverflow.com/a/77515370/
// Use `[*Light*]` to match themes whose name contains `Light` in them.
"workbench.colorCustomizations": {
"[*Light*]": {
"manimNotebookColors.baseColor": "#FF708A",
"manimNotebookColors.unfocused": "#FFBFCC"
},
"[*Dark*]": {
"manimNotebookColors.baseColor": "#FF708A",
"manimNotebookColors.unfocused": "#804953"
},
"[*Light High Contrast*]": {
"manimNotebookColors.baseColor": "#FF5473",
"manimNotebookColors.unfocused": "#FFA3B6"
},
"[*Dark High Contrast*]": {
"manimNotebookColors.baseColor": "#FF5473",
"manimNotebookColors.unfocused": "#8C5660"
}
}
If you encounter an issue, search for some related keywords first in the issues. If you can't find anything, feel free to open a new issue. To analyze the problem, we need a log file from you:
Ctrl+Shift+P
(or Cmd+Shift+P
)Manim Notebook: Record Log File
.Manim Notebook
and selecting Trace
.