Closed erauner12 closed 1 year ago
if run-javascript
for example, then open open in vscode with syntax highlighting of .js
file:
ex:
function multiple(x) {
function fn(y)
{
return x * y;
}
return fn;
}
var triple = multiple(3);
triple(2); // returns 6
triple(3); // returns 9
console.log(triple(2));
Would this open the Markdown file, but with JS language mode on? Or a separate file created for the specific code block?
separate file would make most sense, however I'f then also expect a way to send codechanges back to obsidian
this could be achieved by
I see, thanks. Currently, editing the code block content is difficult for the plugin (as we apply buttons to the rendered version -- accessing the source code from the rendered version is hard).
This can definitely be done, but we'd have to get that working first. I'm sorry
As @chlohal said, this is hard to do and not part of the near-future roadmap. If you use javascript
instead of run-javascript
at least the syntax highlighting will still work and you can still run the code in the reading. You can also install the plugin Completr to get an IDE-like auto-completion.
Makes sense, I appreciate the consideration!
how hard would it be to run a whole file, instead of a block? this would avoid the need to handle the editting of code blocks, since you can just open the whole note in an IDE.
![[my_note.py]]
to expand the content
If I want to make changes to the code with the full power of a code editor, it would be cool if I could open the contents of the code in an individual block in vscode, for example.