vim - vim中的折叠功能

标签 vim folding

有什么方法或工具可以在 vim 中折叠功能,例如 Visual Studio 或 Eclipse?

最佳答案

    Vim folding commands
---------------------------------
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.
za toggle a fold at the cursor.
zo opens a fold at the cursor.
zO opens all folds at the cursor.
zc closes a fold under 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.

来源:vim 文档。

关于vim - vim中的折叠功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2362914/

相关文章:

git commit in terminal 打开VIM,但是无法回到终端

vim - 使用 MacVim 识别 vimrc 文件时遇到问题

vim - 如何在 Vim 中取消设置变量?

linux - vim 和 sudo vim 在 openSUSE 上使用不同的设置

configuration - notepad++ 用户定义的折叠区域

linux - 在 Vim 中重新映射 Escape 键(德语键盘)

Vim 等效于 emacs 主模式标签

vim - 在vim中打开一个折叠并跳到它的末尾

c# - 语义#region 用法

vim - 有没有办法在vim中折叠少于一行?