Vim Python 模式折叠

标签 vim python-mode

我最近下载了 Python-Mode .当我打开一个 python 脚本时,我的函数被折叠了。我可以轻松展开(当您处于功能定义之上时,它是移动键之一)。但是,我不知道如何重新折叠该功能。

此外,也许最重要的是,:help pymode返回错误(“E149:抱歉,pymode 没有帮助”)。所以我什至无法查找文档。

任何帮助,将不胜感激。

最佳答案

这是折叠命令的列表:

zf#j creates a fold from the cursor down # lines.
zf/string creates a fold from the cursor to string .
zj moves the cursor to the next fold.
zk moves the cursor to the previous fold.
zo opens a fold at the cursor.
zO opens all folds at the cursor.
zc close a fold at the cursor.
zm increases the foldlevel by one.
zM closes all open folds.
zr decreases the foldlevel by one.
zR decreases the foldlevel to zero -- all folds will be open.
zd deletes the fold at the cursor.
zE deletes all folds.
[z move to start of open fold.
]z move to end of open fold.

您要找的是zc .

关于Vim Python 模式折叠,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23579058/

相关文章:

vim - 如何关闭当前选项卡中的所有缓冲区?

python - python-mode.el 中带有反斜杠续行的正确缩进

emacs - 在 Emacs python 模式下执行表达式并打印其值

python - 让 Vim 了解 python 的 ctag 类型注释

bash - Vim 在交互模式下无法识别别名?

vim - 为什么我的 vim 配色方案在我更改缓冲区时发生变化

python - VIM:在 python 模式下使用 python3 解释器

python - Bash 或 vim 别名/命令在创建 Python 文件时使用某个模板?

python - Emacs python 模式 : Keyboard shortcuts for pdb step-by-step debugging

python - 使用自动完成、python 模式和绳索设置 emacs