Reputation: 48436
I have a Jupyter notebook and I would like to directly edit its JSON code in VS Code. However, when I open the notebook, VS Code goes in "Jupyter" mode instead of showing me the actual JSON code.
My current workaround is to rename the file to .json
, edit it, save it, then rename it back to .ipynb
. That's not very convenient. Is there a better way?
Upvotes: 6
Views: 4210
Reputation: 783
You can use VS Code Jupyter Notebook Previewer Extension in vs code.
Link : https://marketplace.visualstudio.com/items?itemName=jithurjacob.nbpreviewer
Upvotes: 0
Reputation: 59
Left panel -> Find your file -> Right Click -> Open With... -> Select "Text Editor"
You can then enable syntax highlighting by going in the bottom right, and selecting the right type for the file contents (in your particular case, it's JSON.)
Upvotes: 5