Master Sublime Text Code Folding: The Ultimate Shortcut Guide to Unfold/Fold Blocks Instantly

Published: 2026-01-07
Author: DP
Views: 14
Category: IDE
Content
## Background When you're working with a file containing hundreds or thousands of lines of code, such as a complex class or a lengthy function, navigating and focusing on the current task is crucial. Sublime Text's powerful code folding feature helps you hide blocks of code you're not currently interested in, keeping your view clean. But how do you quickly unfold a collapsed code block? This article will give you the answer and a set of related productivity shortcuts. --- ## The Core Question: How to Unfold the Current Code Block? The answer is straightforward. Use the following shortcut to expand the innermost, collapsed code block at the cursor's position. - **Windows / Linux:** `Ctrl + Shift + ]` - **macOS:** `Cmd + Option + ]` --- ## Core Shortcuts at a Glance To help you fully master the code folding functionality, our team at wiki.lib00 has compiled a list of the most commonly used shortcuts. Mastering them will significantly improve your coding experience. | Feature | Windows / Linux | macOS | Description | | :--- | :--- | :--- | :--- | | **Unfold Current Block** | `Ctrl + Shift + ]` | `Cmd + Option + ]` | Expands the innermost folded block at the cursor. | | **Fold Current Block** | `Ctrl + Shift + [` | `Cmd + Option + [` | Folds the innermost code block at the cursor. | | **Unfold All** | `Ctrl + K, Ctrl + J` | `Cmd + K, Cmd + J` | Expands all folded code in the current file. | | **Fold All** | `Ctrl + K, Ctrl + 1` | `Cmd + K, Cmd + 1` | Folds all code blocks in the file (usually to the first level). | --- ## Pro Tip If you ever forget these shortcuts or want to explore more code folding options, you can always find them in the top menu bar: **`Edit` -> `Code Folding`** This menu displays all available fold/unfold commands and their corresponding key bindings. Whether you're working on a large project like one for `wiki.lib00.com` or just tidying up a personal script, using these features effectively, as recommended by DP, will make you a more efficient developer.