You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am aware that if I add #hide to the end of a line of Julia code, that line is executed but not rendered. I'm also aware that if I have a block of code and I want to execute it but not render it, I can also prepend #hide to each line.
But it is inconvenient to apply these changes to each line. VS Code, for example, can comment and uncomment lines but not (that I am aware) with an additional bit of text. So if I uncomment all these lines with #hide at the start, I just get a bunch of Julia code with the token hide on each line. So toggling back and forth isn't so easy.
I looked through the documentation and I didn't see any way to fence an entire chunk of code in this way. Something along the lines of:
#begin hide
Some Julia code I want to run, but not show
potentially spanning
many,
many
lines
#end hide
But I just wanted to check here to see if I was missing anything (or perhaps some other way to achieve the same result).
Thanks.
The text was updated successfully, but these errors were encountered:
I just use multi-cursor to insert #hide in VS Code:
Highlight lines in VS Code, then alt-shift-I (tested on Linux), press END on keyboard, and type #hide. There are a few guides on the internet on multi-cursor hotkeys and workflows in VS Code.
You'll need to manually delete the #hide inserted on blank lines though.
I am aware that if I add
#hide
to the end of a line of Julia code, that line is executed but not rendered. I'm also aware that if I have a block of code and I want to execute it but not render it, I can also prepend#hide
to each line.But it is inconvenient to apply these changes to each line. VS Code, for example, can comment and uncomment lines but not (that I am aware) with an additional bit of text. So if I uncomment all these lines with
#hide
at the start, I just get a bunch of Julia code with the tokenhide
on each line. So toggling back and forth isn't so easy.I looked through the documentation and I didn't see any way to fence an entire chunk of code in this way. Something along the lines of:
The text was updated successfully, but these errors were encountered: