如何在 PyCharm 中制作部分 [英] How to make section in PyCharm
问题描述
我刚刚从 R 转到 Python.在 R 中你可以使用
I have just moved to Python from R. In R you can use
#new section####
将新部分"作为脚本部分列表中的标题.然后,您可以通过在跳转到菜单"中点击此标题轻松找到该脚本块.(见图).在这张图中,标题是阅读2013年之前的数据".
to have the 'new section' as title in the script section list. Then, you could easily find that block of script by hitting this title within "Jump to menu" (see figure). In this figure, the title is "reading data before 2013".
我试图在这里找到我的答案https://confluence.jetbrains.com/display/PYH/Code+folding 和这里 https://www.jetbrains.com/help/pycharm/code-folding.html 但我对折叠、类和....
I have tried to find my answer here https://confluence.jetbrains.com/display/PYH/Code+folding and here https://www.jetbrains.com/help/pycharm/code-folding.html But I am lost in terms folding, class and....
如何在 PyCharm 中模仿此选项?
How can I mimic this option in PyCharm?
推荐答案
参见 使用代码折叠注释
对于 Python 文件:
For Python files:
#region Description
...
#endregion
这篇关于如何在 PyCharm 中制作部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!