desmond13
desmond13

Reputation: 3139

How to show line numbers of a python notebook in Visual Studio Code

I think it should be quite straightforward, however, I cannot seem to find this option in visual studio code.

Could you tell me if it is possible and how to enable line numbers in visual studio code when coding in a python notebook?

FYI: it is possible to use visual studio code with a python notebook (you can check more info here)

Upvotes: 7

Views: 6364

Answers (2)

jhonnyfc
jhonnyfc

Reputation: 301

You have to press L after clicking on the left side of the code block.

Screenshot

Upvotes: 16

ekrako
ekrako

Reputation: 179

as mention in the link provided you just need to press the L key https://code.visualstudio.com/docs/python/jupyter-support#_enabledisable-line-numbers

Upvotes: 5

Related Questions