Not getting inline results on VS Code similar to Juno

Hi

I recently switched from Juno to VS Code, and I’m looking for a way to replicate the following test

Thus far, I’ve set the results to show inline
Capture

but it only appears in REPL on execution. Capture2

What am I doing wrong?

3 Likes

You’re probably using Ctrl-Enter to evaluate code, which explicitly pastes the current line into the REPL. Try Alt-Enter instead (we’ll rework the keybindings soonish though).

4 Likes

Spot on. My hands are still used to the Juno keybindings

However, the results are only available on hoverUntitled

Is there a way to toggle it on&off like Juno?

2 Likes

No, that unfortunately is a limitation of VSCode.

Ah, ok. That’s a shame.

If you want to use Juno keybindings, have a look here: https://github.com/julia-vscode/julia-vscode/wiki/Keyboard-shortcuts

1 Like

Now this is a game changer, especially

{ "key": "ctrl+shift+enter", "command": "language-julia.executeFile", "when": "editorTextFocus && editorLangId == 'julia'" },

Which configuration file do I put these key bindings into?

Open the command palette with Ctrl-Shift-P and type in Open Keyboard Shortcuts (JSON). You can just paste the whole config file in there.

2 Likes

It’s the keybindings.json file which is found In VS code by entering Ctrl-Shift-P and searching for open keyboard shortcuts (JSON).

It should be located in the following folder on your computer: C:\Users\USERNAME\AppData\Roaming\Code\User\

1 Like

Are there plans to have the nested dropdowns of inline results in VSCode? I’ve found it very useful for quickly inspecting my code.

Yes, but we depend on upstream to implement that. For now you might be interested in the workspace explorer, which gives you tree views for all variables.

2 Likes

I was wondering how can I get to know about new infos of the julia extension in Code. I remember that in JuliaCon2020 was said that the Juno and Code teams had merged together to only stay in Code, so I was looking forward to keep up with the news.

Perhaps by reading posts on this forum with VS Code tag.

1 Like