Smart parsing .jmd files (Weave.jl)

I recently discovered Weave.jl, and it’s quickly become my go-to method for incorporating code/commentary. This is important for me since I’m using julia for scientific analysis and reproducibility is essential, and is possible largely because Juno will actually evaluate the code in code blocks, which is phenomenal!

One problem I’m running into though is if I’m using the same code across multiple sessions, and I want to be able to quickly get back to where I left off - I have to manually go through and run the code in each block manually. It would be great if I could just evaluate the whole file and ignore the stuff that’s outside the

```julia
# codeblock
```

Any way to make this work?

2 Likes

The next version of the julia extension for VS Code will have some Weave integration, and one thing you can do there is run a whole weave file with one command and then see the final document right within VS Code. I’m not sure when we will publish the next version, though, and I would recommend against trying to get our development version working (it is complicated). But you might keep an eye on GitHub - julia-vscode/julia-vscode: Julia extension for Visual Studio Code for the next release.

3 Likes

Neat! Not sure I’ve got the energy to shift text editors again though :-/

This’d be a cool feature in Juno

1 Like

Yup, this would definitely be nice to have. I won’t get around to implementing this in the foreseeable future though (next ~2 months), but feel free to open a feature request over at atom-julia-client and/or take a stab at the implementation yourself! :slight_smile:

4 Likes

Feature request made!

As mentioned there - I’d be happy to take a stab at this, but I haven’t done any Atom development, so would love some guidance on where to start.

1 Like

Sounds amazing. The similar function in RStudio is very useful. I like this feature.

(Pinging @davidanthoff…)
Sorry for necroing this thread, but I’m curious about how far along the Weave integration in VScode has come. All I can figure out is that VScode recognizes .jmd files and you can send lines in Julia blocks to the terminal using Ctrl-Enter. But what about the dream - previews of .jmd files within VScode? And the next step after that: real-time preview while typing (is that even possible without killing performance)?

2 Likes