Notebooks are getting revamped!

Claudia Regio

The Python Extension for VS Code Insiders is excited to announce the new preview for Native Notebooks! Native Notebooks are VS Code’s newest implementation of notebooks and the Python Extension is leveraging the Native Notebooks API to revamp the data science experience! Users can now benefit from the new functionalities below:

  • The same extensions that users rely on when editing source code or markdown text in the VS Code Editor are now available in notebooks! For example, you won’t miss your VIM key bindings or your stylishly colored brackets anymore.
  • In addition to an improved integration between extensions in notebooks, we have drastically improved the load time for notebooks! The following notebook builds and assesses the accuracy of an image recognition model that differentiates between dog breeds contains 49 code cells, 18 markdown cells, and their outputs (~5MB). The current notebook editor takes about 7 seconds to open this notebook, but the new notebook editor takes less than a second!
  • Last but not least, the new interface has a fresh look and feel along with additional UI changes and cell manipulation capabilities that match VS Code’s design language that we’d love to get your feedback on.

Our goal is to reduce the time it takes you to get your work done and done well, with the sum of all these cumulative changes.

For additional information on the new Native Notebooks API, click here.

How to try out Native Notebooks:

We are currently exclusively rolling out this new experience in VS Code Insiders build. If you do not already have it, download and install the latest version of the Python Extension from the marketplace or install it directly from the extension gallery in Visual Studio Code.

To try the new native notebook, follow the instructions below:

  1. Make sure the Python extension is activated. You can do so by creating a new notebook (Ctrl + Shift + P “Python: Create New Blank Jupyter Notebooks”).
  2. File -> Open Folder…
  3. Right click on the .ipynb file you would like to open and select “Open in preview Notebook Editor”.

How to try native notebooks

What else is new?

  • File management: Save as, Rename, Open from file, etc.
  • Highly requested shortcuts: Undo/Redo (Ctrl + Z/Command Z)
  • Cell execution times to help you better understand the performance of your code and notebooks as a whole
  • Quick cell manipulation
    • Join cells using the command “Notebook: Join with Next Cell” or “Notebook: Join with Previous Cell” for easy merging
    • Split cells at your cursor location using the “Split Cell” icon on the cell toolbar
    • Drag and drop capabilities for easy position rearrangement

Joining and Splitting Cell

  • Collapsible cells and code blocks to ensure that irrelevant code is neatly tucked away while you are focusing on the most pertinent code and optimizing screen space.

Collapsing Cell

What’s in store?

We will be working diligently to roll over the current fan favorite features such as data viewer and variable explorer as well as newly released functionality such as run-by-line and Gather to ensure feature parity with the existing Python notebooks experience!

Keep an eye out for continued improvement of Native Notebooks! If you would like to contribute to the development please leave a suggestion on our vscode-python GitHub repo. We look forward to hearing your feedback!

 

For Early Adopters:

VS Code Insiders has the most recent code pushes and may lead to the occasional broken build. It is recommended to make a copy of your file prior to trying the new experience.

12 comments

Discussion is closed. Login to edit/delete existing comments.

  • Chensong 0

    This is more than fantastic!

  • Andreas 0

    Exciting news, keep up the great work!

  • Emmanuel Adebiyi 0

    Interesting! Great job guys, keep it up.

  • Sven Langer 0

    You mentioned that I can use my VIM bindings and that would be THE feature for me. But unfortunately my vim plugin is not working in a notebook. I’m using the “neo vim” plugin. Is a different plugin working?

    • Claudia RegioMicrosoft employee 0

      Have you tried vscodevim? We are still rolling over the experience to new native notebooks and that might still be in the works.

      • Eduardo Paul 0

        I agree with Sven. Not being able to use vim-like keybindings is the main thing preventing me from using notebooks. Now it’s been about a month since your last post and I’m using vscodevim but still it doesn’t work in the notebook. Is there some option I have to set anywhere??

        • Bing Song 0

          Still cannot use VIM binding in Python in Visual Studio Code – September 2020 release. Tried both vscodevim and Neo Vim

  • Ryan Boris 0

    Honestly, this is incredible. I’ve wanted to switch to using VSC-based notebooks in my day to day work for a while now but found it hard to be as productive without some key features. Not only does this look incredible, but functionally it has a majority of the features I needed to be able to make the switch and use this as the main tool in my day to day work now! Truly a wonderful exemplar of development and listening to users and providing for their needs. Thank you so much for all your work and continued work on this feature set!

  • Gerhard Just Olsen 0

    Huge thumbs up!

  • Petteri Nevavuori 0

    Great work, albeit I must confess to still not using your implementation over native Jupyter Notebooks. The thing that still keeps me from coming completely to using Notebooks in VSCode is the absence of really good Jupyter extensions (https://jupyter-contrib-nbextensions.readthedocs.io/en/latest/install.html). Especially the ability add navigatable ToCs on-the-fly is what tremendously helps me and my peers to get a general grasp of what was done and where in the notebook.

    If the support for Jupyter extensions (ToC etc.) is added, you’ll get another happy user using VS Code as the Notebook editor/viewer!

    • Claudia RegioMicrosoft employee 0

      Thanks for the feedback Petteri! Hopefully you’ll be happy to hear those features are on their way, hold tight! 🙂

  • Rov 0

    Nice work, this is good news.

Feedback usabilla icon