Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you fold code by indentation in sublime 3?

In atom, the below is what you use to fold code by indent levels, but how do you do this in sublime?

Ctrl+k, then Ctrl+1 ... 9 Fold all code at indent level 1 ..

like image 676
stackjlei Avatar asked Feb 02 '26 15:02

stackjlei


2 Answers

Same: Ctrl + K, Ctrl + 1 to fold all code on indent 1.

To unfold all Ctrl + K, Ctrl + J.

Same procedure all the way to indent 9 (Ctrl + K, Ctrl + <number>). You can also fold by clicking on the side line number arrow:

enter image description here

like image 76
Syden Avatar answered Feb 05 '26 05:02

Syden


CMD/CTRL + K, CMD/CTRL + <number>

for example, on MacOS, to fold to indent-level-1: CMD+K, CMD+1

Using menus: On MacOS: Edit > Code Folding > <level>

like image 42
tgallacher Avatar answered Feb 05 '26 06:02

tgallacher



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!