Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confused about code execution #103

Open
peekxc opened this issue Mar 1, 2023 · 7 comments
Open

Confused about code execution #103

peekxc opened this issue Mar 1, 2023 · 7 comments

Comments

@peekxc
Copy link

peekxc commented Mar 1, 2023

For Quarto VSCode version 1.70 in the changelog it was mentioned:

Cell execution and navigation for visual mode

For my visual editor I cannot execute cells though. I tried changing the keybinds but they seem to only work in the source mode.

Am I misunderstanding the changelog comment or is this a bug on my end?

Versioning:

Versions: quarto v1.3.217 w/ VSCode extension v.1.71.0
Platform: OS X 10.15.7

@jjallaire
Copy link
Contributor

We haven't written up the docs on this (apologize for the delay!). When we do, we'll note that Python chunks currently can't be executed (I'm guessing that is what you are seeing). This is because we call the Jupyter extension to execute Python code and it in turn expects that an active text editor is in the foreground in order to work correctly. It should however currently work for R and Julia (we'd definitely like to make it work for Python but we need some outside help for that to happen)

@peekxc
Copy link
Author

peekxc commented Mar 1, 2023

Ahh, I see, yes I was trying to execute Python code. Sounds good, I'll wait patiently; thanks for all your hard work regardless!

Possibly related this issue, which I think has also come up in the context of jupytext.

Also see: https://marketplace.visualstudio.com/items?itemName=congyiwu.vscode-jupytext

@jjallaire
Copy link
Contributor

Yeah, that one is about their supporting other plain text formats for code execution. Here the visual editor is a "custom editor" so fails their check for activeTextEditor (which is pretty wound up in their overall approach, so not a one-liner to remedy).

@GitHunter0
Copy link

I'm glad I found this thread, I thought there was an issue with my VScode.

It would be nice to have this stated in the documentation.

@mcanouil
Copy link
Contributor

mcanouil commented Jul 5, 2024

@mine-cetinkaya-rundel
Copy link
Contributor

Currently, it is possible to execute Python cells individually in the visual editor in Positron, but not in VS Code.

@mcanouil
Copy link
Contributor

mcanouil commented Jul 5, 2024

FYI, positron repository: https://github.com/posit-dev/positron

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants