This month Visual Studio Code code got somewhat unexpected, kind of cool feature. Until now it was impossible to edit IPython Notebooks anywhere but in in-browser Notebook environment (as far as I know), but that’s no longer the case.

In this article, I will show you how you can edit Notebooks directly inside your (possibly) favorite code editor, and we’ll discuss whether it’s worthy to make a switch. Visual Studio Code has been my go-to code editor for a couple of years now, mainly due to huge number of plugins. Also, the themes are neat.
Over the last year or so, my job is mainly Data Science orientated, which means that I can achieve more in less time by using the Notebook environment instead of the classical text-editor approach most developers find optimal. It’s quite a bummer then not be able to use my favorite code editor as much as I want to, but it is what it is. At least until now.
Let’s quickly skim through topics which this article will cover:
- How to download Visual Studio Code
- Downloading plugins and editing notebooks
- Choosing the right theme
- Closing thoughts
Without further ado, let’s jump into the first topic.
How to download Visual Studio Code
The installation process will differ depending on your OS. I’m on Windows so that’s what I’ll cover. I doubt that installation on Mac or Linux would be more difficult. The first thing to do is to open up this page and to hit that big bold blue button that says Download for Windows:

Once downloaded you’ll just need to open up the .exe file and to click on next a couple of times. After a minute or so, you’re ready to rock.
Once VS Code is opened for the first time it won’t look as amazing as it can. Here’s how it looks on my machine:

We’ll address this somewhat ugly appearance shortly.
Downloading Plugins and Editing Notebooks
If you were to open IPython Notebook straight away, you won’t get what you’ve wished for:

You get some JSON looking piece of code which is not something you should edit. I mean you can if you want to, but why?
To get you started, you’ll need to install support for Python made by Microsoft. Press on the button I’ve stylishly highlighted on the image below and type python. Install the first one you see:

The extension will install in a couple of seconds and you’re ready to go:

If you now open up some IPython Notebook, the outcome will be more pleasing (bare in mind that it will take longer to open the Notebook here than in Jupyter environment):

Voila! That was easy, right? Okay, let’s now do something to make everything look like it’s 2019.
Choosing the Right Theme
Before starting I just want to state that this section is biased and everything I say is only my opinion. You should style the editor in any way that’s ideal for you. You can install themes the same way you installed the Python plugin a few minutes before. Easy.
Here’s a list of themes I found to be working very well for Notebooks:
- Atom One Dark

2. Monokai Dimmed

3. Light (Visual Studio)

Even though I’m a huge fan of Material themes I really can’t recommend them for Notebook setup because they remove cell boundaries – which as the end result looks kind of weird.
And there you have it, everything works exactly the same as in Jupyter. You run cells by pressing SHIFT + ENTER and everything feels like it’s supposed to feel.
But is the switch worth it? Find out my opinion in the next section.
Closing Thoughts
So far so good.
The question remains, should you really make the switch?
My answer at this point in time is no, due to two reasons
- Code execution is somewhat slower than in the Jupyter environment. Not so much that it should affect your occasional data analysis project, but if you’re doing this daily then Jupyter is still a way to go.
- It takes more time to open up the Notebook
With environments like Jupyter Lab, which already kind of looks like a sophisticated code editor, I found Visual Studio Code to be lacking. At least for now, who knows what the future brings. You should at least try it, I don’t recommend you to rely only on my opinion. With that being said, I hope the plugin get’s optimized in the future.
What are your thoughts? Have you made the switch? Let me know.
Loved the article? Become a Medium member to continue learning without limits. I’ll receive a portion of your membership fee if you use the following link, with no extra cost to you.