3

I wonder how others use the diff view for notebooks in VS Code. With the recent updates the diff view change when I use the Python extension (which includes the Jupyter extension).

So before I used to see the line base text diffs, which I still see if I turn off the Python extension:

https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter

When I turn the Python extension on, I see a one-to-one comparison where I do not see much if the notebooks are a bit more complicated (changing some details in a Markdown-Cell): enter image description here

Questions

  • Is there a way to get to the line-based first diff view using some command(s) other than turning the extension off?

I am on Windows and I tried to turn off several settings in the extension(s), without seeing any difference: enter image description here

I also remember there being a "do not show automatically in notebook editor" setting, but I cannot see it right now! I have to manuelly start the notebook viewer in the File-Tab (first) as I want though, so it is "off".

Any ideas what I am missing or do you think this is a bug?

5
  • an older issue regarding the Python extension on this issue Commented Apr 22, 2021 at 20:52
  • 1
    -You could try the method in this link to test this process in "Visual Studio Code Insiders": Git diff for ipynb files is being replaced by the notebook editor Commented Apr 23, 2021 at 8:13
  • Thanks a lot @JillCheng. In Visual Studio Code Insiders the richer diff (using nbdime ?) is working! And the setting referenced activates the line based diff view! Commented Apr 26, 2021 at 9:46
  • Do you know by chance if commits of single cells is a planned future feature? Commented Apr 26, 2021 at 9:48
  • -You could follow the Github link in my comments or you could create a new GitHub submission. Commented Apr 27, 2021 at 1:09

2 Answers 2

1

You could try the method in this link to test this process in "Visual Studio Code Insiders": Git diff for ipynb files is being replaced by the notebook editor

Sign up to request clarification or add additional context in comments.

Comments

0

Following Jill Cheng's comment, I know see the "rich" diff on default (and can turn it off using the settings snippet referenced:

enter image description here

Uncommenting these settings will give me the line-based diff, if I need to stage only parts of the notebook.

enter image description here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.