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)
On the menu bar, choose Tools > Options. Expand the Text Editor node, and then select either the language you're using or All Languages to turn on line numbers in all supported programming languages. You can also type line number in the Search box, and then choose Turn line numbers on or off from the results.
Jupyter Notebooks in VS Code. Jupyter (formerly IPython Notebook) is an open-source project that lets you easily combine Markdown text and executable Python source code on one canvas called a notebook. Visual Studio Code supports working with Jupyter Notebooks natively, and through Python code files.
To select an environment, use the Python: Select Interpreter command from the Command Palette (Ctrl+Shift+P). Once the appropriate environment is activated, you can create and run Jupyter-like code cells, connect to a remote Jupyter server for running code cells, and export Python files as Jupyter notebooks.
You have to press L after clicking on the left side of the code block.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With