Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
787 views
in Technique[技术] by (71.8m points)

python - Line numbers for every cell in VSCode Jupyter Notebook Cells

In the normal Jupyter notebooks, we can add line numbers by pressing the L key after selecting the cell. All the subsequent cells for that notebook will have line numbers automatically.

But this is missing in VSCode. Every time a new cell is created, we need to select the cell and press the L key to enable the numbering for that cell which is very tiresome.

Is there a way to automatically enable line numbering for all the cells in the VSCode Jupyter notebook instead of manually pressing the L key for each and every cell?

Thank you.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

In VS Code Jupyter Notebook, you can toggle line numbers by pressing L. The trick is to select the current cell first. You could select your cell by clicking in the blank area on the left margin of the cell (when it's selected the bar on the left turns blue). Now if you press L on your keyboard, you would be able to turn the line numbers on/off.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...