[英]Jupyter notebook in VS Code - No color for the python code in ipynb-file. What am i doing wrong?
[英]VS Code editing .ipynb file: How to collapse notebook cells?
目前,VS Code 的 Jupyter 不支持使用這個 function,您可以參考這個鏈接: Jupyter notebook cell code fold 和 output 視圖擴展請求。
另外,請嘗試使用“ Visual Studio Code Insiders ”,在 Jupyter 的單元格中單擊鼠標右鍵,然后 select“ Collapse Cell Input
”或“ Collapse Cell Output
”:
前:
后:
在我的 VSCode 內部人員構建版本 1.61.0 中,它可以工作。
什么工作->
a) One shot expand/collapse all cells(code/output) in '.ipynb'(notebook)
b) Single cell code/output expand/collapse in '.ipynb'(notebook)
c) code folding in `.py` file with `#%%` (hierarchy style)
對於.ipynb
(您的要求)
有可用的鍵綁定: jupyter.notebookeditor.expandallcells/collapseallcells
它能做什么?
Expands/collapses all cells in one shot
找到這個設置->
Top menu File->Preferences->Keyboard Shortcuts In search("Type to search in keybindings"...top side) type "Notebook Expand" or "Notebook Collapse", check out: Notebook: Expand/Collapse All Cells, Notebook: Expand/Collapse Cell Input and Notebook: Expand/Collapse Cell Output Its possible to expand/collapse single/all cells with these shortcuts keys.
為了使這個答案完整(其他人已經回答)->
1. double click gutter area (immediate space on left side of code cell) to Expand/Collapse cell (code/output)
2. right click on gutter area to get Expand/Collapse cell (code/output)
另一種折疊單元格的方法即將發布到 v1.64。 看
單元格折疊 UI
筆記本單元格的左側有一個藍色條,表示它們已聚焦。 此欄現在是交互式的 - 您可以單擊頂部折疊單元格輸入,單擊底部折疊 output。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.