Inline Evaluation Question

Hello,

I am using Julia 1.6.2 in vscode 1.61.2 with Julia Language extension version 1.4.3.

I’ve noticed sometimes on certain lines I get an inline evaluation to the right. But I don’t really understand how to control it or what I am doing, I just experimented around with it. I tried looking for documentation here, but there wasn’t much of a description. I’m not sure what “cell” is referring to since I am just using a normal julia script file, no notebooks or anything fancy.

If I press “Shift + Enter” it appears to run the entire script and then shows the inline evaluation of the last line in the script. If I do “Alt + Enter” and I have a single line highlighted it will show the inline result of that single line, but if I have multiple lines highlighted/selected it only shows the result of the final highlighted line inline.

Does anyone know what is meant by “cell” in the link above?

Cells are blocks of code delimited by lines starting with ## .

2 Likes

Also, if you don’t select any part of the code, but just keep the cursor at some point, Alt+Shift Alt+Enter runs the outermost block including that point (may be one line, or multiple lines if there is a loop, a function definition, a begin-end block, etc.

The biggest non-module top-level block to be precise, I think. Also, the keybinding is Alt-Enter :slight_smile:

1 Like