@@ -76,9 +76,17 @@ export function deactivate() {
76
76
}
77
77
78
78
/**
79
- * Previews the Manim code of the cell where the cursor is placed
80
- * (when accessed via the command pallette) or the code of the cell where
81
- * the codelens was clicked.
79
+ * Previews all code inside of a Manim cell.
80
+ *
81
+ * A Manim cell starts with ##
82
+ *
83
+ * This can be invoked by either:
84
+ * - clicking the code lens (the button above the cell) -> this cell is previewed
85
+ * - command pallette -> the 1 cell where the cursor is is previewed
86
+ *
87
+ * If Manim isn't running, it will be automatically started
88
+ * (at the start of the cell which will be previewed: on its starting ## line),
89
+ * and then this cell is previewed.
82
90
*/
83
91
async function previewManimCell ( cellCode ?: string , startLine ?: number ) {
84
92
let startLineFinal : number | undefined = startLine ;
@@ -113,7 +121,16 @@ async function previewManimCell(cellCode?: string, startLine?: number) {
113
121
}
114
122
115
123
/**
116
- * Previews the Manim code of the selected text.
124
+ * Previews the selected code.
125
+ *
126
+ * - both ends of the selection automatically extend to the start and end of lines
127
+ * (for convenience)
128
+ * - if Multi-Cursor selection:
129
+ * only the first selection is considered
130
+ * (TODO: make all selections be considered - expand at each selection)
131
+ *
132
+ * If Manim isn't running, it will be automatically started
133
+ * (before the first selected line).
117
134
*/
118
135
async function previewSelection ( ) {
119
136
const editor = window . activeTextEditor ;
@@ -146,8 +163,8 @@ async function previewSelection() {
146
163
}
147
164
148
165
/**
149
- * Runs the `clear()` command in the terminal to remove all objects from
150
- * the scene.
166
+ * Runs the `clear()` command in the terminal -
167
+ * removes all objects from the scene.
151
168
*/
152
169
async function clearScene ( ) {
153
170
try {
0 commit comments