-
Notifications
You must be signed in to change notification settings - Fork 295
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
Be able to save a notebook without saving output #9514
Comments
This is really a vscode core thing. |
this could be very useful, particularly when we are handling sensitive info that we don't want to commit on git repos. |
I am also looking for a way to do this. I wanted to switch to using VS Code to work on jupyter notebooks, but I can't figure out an automatic way to get the nice .Rmd files I'm used to. I never want to put generated output into version control. Previously, with normal jupyter notebook, I used jupytext to make nice files for version control. I added two lines to my jupyter config:
and everything magically works. The output and all the nasty json gets saved in the .ipynb file, which I .gitignore, while a human readable (and sanely version controllable) .Rmd file gets created automatically. I'd like this inside VS Code. Aside: I tried, just as a workaround, to use a "run on save" extension in VS Code, in order to automatically convert my .ipynb every time I hit "save"... but it looks like the VS Code notebook interface isn't firing the right events for "run on save" extensions to work right (microsoft/vscode#130799). The extensions can't detect that a save occurred. Is there any way to do this with VS Code, even with workarounds? |
Let's track in upstream issue microsoft/vscode#124551 |
It was 1 liner since I used Git and VS Code on it.
Any way to restore the indention as you described?
Maybe add an option to auto do it on save? As this 1 line mode make it Git unfriendly.
By the way, it would be also great to have "Save without Output on HD" mode (Git friendly save mode).
Originally posted by @RoyiAvital in #9491 (comment)
The text was updated successfully, but these errors were encountered: