visual-studio-codejupyter-notebookjupytercleartext

Is there a way to open any file as text in VS Code?


VS Code is currently my favourite text editor, except for Jupyter notebooks, which are opened as interactive python environments (let's call this 'rendered'). By itself it is nice that this is possible, but not I can live with opening them in a browser if VS Code would not render them. There used to be a setting to avoid this behaviour ("jupyter.useNotebookEditor": false) but currently my installation does not recognise this setting anymore. Since there are more file types that can be opened as text/source, or rendered form (e.g. html, md, svg, uncompressed pdf, etc.) and both forms can be usefull, I would be very excited to learn how to switch between rendered and source, preferably without switching global settings. Is there a way to do this? I would hope for:


Solution

  • Are you just looking for a way to view/edit the raw json?

    You can right click the file in the Explorer -> open with... -> text editor.

    Or use "Reopen editor with text editor" from the command Palette (ctrl+shift+p)