
įold All Block Comments ( Ctrl+K Ctrl+/) folds all regions that start with a block comment token.įold Level X ( Ctrl+K Ctrl+2 for level 2) folds all regions of level X, except the region at the current cursor position.Unfold All ( Ctrl+K Ctrl+J) unfolds all regions in the editor. įold All ( Ctrl+K Ctrl+0) folds all regions in the editor.Unfold Recursively ( Ctrl+K Ctrl+]) unfolds the region at the cursor and all regions inside that region.

įold Recursively ( Ctrl+K Ctrl+[) folds the innermost expanded region at the cursor and all regions inside that region.Toggle Fold ( Ctrl+K Ctrl+L) folds or unfolds the region at the cursor. There are several advanced keyboard shortcut to fold/unfold code blocks in VSCode, although I personally don’t use them very often. You can quickly fold a block of code, given that your cursor is placed inside of it by pressing Ctrl+Shift+ key combination will unfold the collapsed region at the cursor.Īlternatively, one can use the Command Palette and type fold to do the same thing, although it will take more than one keyboard shortcut to complete

In VSCode terminology, the collapsible code blocks feature is called Fold/Unfold.

3 Advanced Collapse Settings VSCode Collapse/expand
