cd /news/developer-tools/vim-folding-cheatsheet · home topics developer-tools article
[ARTICLE · art-10190] src=gist.github.com ↗ pub= topic=developer-tools verified=true sentiment=· neutral

vim folding cheatsheet

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.

read1 min views18 publishedJun 11, 2015

via (https://www.linux.com/learn/tutorials/442438-vim-tips-folding-fun) 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.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.

── more in #developer-tools 4 stories · sorted by recency
── more on @vim 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/vim-folding-cheatshe…] indexed:0 read:1min 2015-06-11 ·