{"slug": "vim-folding-cheatsheet", "title": "vim folding cheatsheet", "summary": "This article provides a cheatsheet of Vim commands for creating, navigating, and managing text folds. It lists commands for creating folds by line count or search string, moving between folds, and opening or closing folds individually or globally. The guide also includes commands for adjusting the fold level and deleting folds.", "body_md": "via (https://www.linux.com/learn/tutorials/442438-vim-tips-folding-fun)\nzf#j\ncreates a fold from the cursor down # lines.zf/string\ncreates a fold from the cursor to string .zj\nmoves the cursor to the next fold.zk\nmoves the cursor to the previous fold.zo\nopens a fold at the cursor.zO\nopens all folds at the cursor.zm\nincreases the foldlevel by one.zM\ncloses all open folds.zr\ndecreases the foldlevel by one.zR\ndecreases the foldlevel to zero -- all folds will be open.zd\ndeletes the fold at the cursor.zE\ndeletes all folds.[z\nmove to start of open fold.]z\nmove to end of open fold.", "url": "https://wpnews.pro/news/vim-folding-cheatsheet", "canonical_source": "https://gist.github.com/lestoni/8c74da455cce3d36eb68", "published_at": "2015-06-11 09:01:40+00:00", "updated_at": "2026-05-22 22:36:09.722862+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["vim"], "alternates": {"html": "https://wpnews.pro/news/vim-folding-cheatsheet", "markdown": "https://wpnews.pro/news/vim-folding-cheatsheet.md", "text": "https://wpnews.pro/news/vim-folding-cheatsheet.txt", "jsonld": "https://wpnews.pro/news/vim-folding-cheatsheet.jsonld"}}