Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text: How to hide all code and show only comments

Lets say we have code like this:

//description 1
code block 1 {
..
..
}

//description 2

code block 2 {
..
..
}

In sublime text, how to show only the comments and hide all the code?

like image 252
HumbleLearner Avatar asked Aug 16 '13 02:08

HumbleLearner


People also ask

How do I collapse all in Sublime Text?

By default you press Ctrl+K , then Ctrl+1 to fold all subroutines. Then, to unfold all I would press Ctrl+K then Ctrl+J . If this does not work for your file type / syntax, try Ctrl+K, Ctrl+2 and above to see if another folding level works for you.

Does Sublime have intellisense?

You can add the auto-complete Intellisense feature for Kony UI, API, and SDK functions while working with Sublime Text from Visualizer. You must install the Ternjs for Sublime package to enable this feature.


1 Answers

In a code like the one you've used as example, you can just "Fold All" the code.

Set the cursor outside any function then: Ctrl + K + Ctrl + 1

then you'll see only the comments and the function/struct signiatures (hidding the body).

like image 143
Hugo Corrá Avatar answered Nov 13 '22 16:11

Hugo Corrá