简体   繁体   中英

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): 在此处输入图像描述

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: 在此处输入图像描述

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?

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

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

在此处输入图像描述

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

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM