enryh
enryh

Reputation: 93

Viewing Ipython Notebooks' line based diff in VS Code while using the Python extension

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

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?

Upvotes: 2

Views: 6509

Answers (2)

enryh
enryh

Reputation: 93

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

Upvotes: 0

Jill Cheng
Jill Cheng

Reputation: 10374

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

Upvotes: 1

Related Questions