[英]How to display a line for every python cell boundary in Visual Studio Code?
In VS Code, when working with python files, if we type #%%
it creates a cell separation.在 VS Code 中,当使用 python 文件时,如果我们输入
#%%
它会创建一个单元格分隔。 When the cursor is within a cell, the editor displays a thick line for the top boundary and a thin line for the bottom boundary (of the current cell only).当 cursor 位于单元格内时,编辑器会为上边界显示一条粗线,为下边界显示一条细线(仅限当前单元格)。 How can I change the style so that a line is always displayed for every cell boundary (like in the Spyder editor)?
如何更改样式以便始终为每个单元格边界显示一条线(例如在 Spyder 编辑器中)?
Edit: I found these settings but they only apply to the interactive window and not the editor:编辑:我找到了这些设置,但它们仅适用于交互式 window 而不是编辑器:
"workbench.colorCustomizations": {
"notebook.cellBorderColor": "#ff0000",
"notebook.cellToolbarSeparator": "#00ff00"
}
I am expecting to find a way of showing lines at the red arrows below:我期待找到一种在下面的红色箭头处显示线条的方法:
I have seen screenshots showing such lines but I can't find how.我已经看到显示这些线条的屏幕截图,但我找不到如何。
Edit 2: Is there a way to customize the style/appearance of every inserted line showing the clickable commands Run Cell | Run Above | Debug Cell
编辑 2:有没有办法自定义每个插入的行的样式/外观,显示可点击的命令
Run Cell | Run Above | Debug Cell
Run Cell | Run Above | Debug Cell
Run Cell | Run Above | Debug Cell
? Run Cell | Run Above | Debug Cell
?
Jupyter is a good choice for you which has separate code cells. Jupyter对您来说是一个不错的选择,它具有单独的代码单元。
Create jupyter notebook from command palette then install required module ipykernal
, you can run python code cell in it.从命令面板创建 jupyter notebook 然后安装所需的模块
ipykernal
,您可以在其中运行 python 代码单元。 Reference: Jupyter Notebook in VS Code.参考: VS Code 中的 Jupyter Notebook。
take a look at this: extension-visualstudio看看这个: extension-visualstudio
maybe we need to checkout [vscode-python] ( https://github.com/microsoft/vscode-python ): package.nls.json stores a lot of dicts, but i can't find Run Cell |也许我们需要检查 [vscode-python] ( https://github.com/microsoft/vscode-python ): package.nls.json 存储了很多 dicts,但我找不到 Run Cell | Run Above |
跑到上面| Debug Cell too..
调试单元也是..
As a possible hack, you can extend the cell commands.作为一种可能的技巧,您可以扩展单元格命令。 The setting for that is called "Jupyter: Code Lenses".
其设置称为“Jupyter:Code Lenses”。 I set mine to: "jupyter.runcell, jupyter.runallcellsabove, jupyter.debugcell, jupyter.runcell, jupyter.runcell, jupyter.runcell, jupyter.runcell, jupyter.runcell, jupyter.runcell, jupyter.runcell, jupyter.runcell, jupyter.runcell, jupyter.runcell, jupyter.runcell, jupyter.runcell, jupyter.runcell, jupyter.runcell, jupyter.runcell"
我将我的设置为:“jupyter.runcell,jupyter.runallcellsabove,jupyter.debugcell,jupyter.runcell,jupyter.runcell,jupyter.runcell,jupyter.runcell,jupyter.runcell,jupyter.runcell,jupyter.runcell,jupyter.runcell, jupyter.runcell、jupyter.runcell、jupyter.runcell、jupyter.runcell、jupyter.runcell、jupyter.runcell、jupyter.runcell"
long cell command list to mimic a cell border模拟单元格边界的长单元格命令列表
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.