Sublime Forum

Fold all functions?

#1

Is there a way or a plugin that will let me automatically collapse all my functions in various languages (personally I’m concerned with PHP and JS)?

There appears to be an option to collapse tags, but that’s pretty language specific.

Even folding all top level or second level elements would be very handy.

0 Likes

#2

edit/code folding/fold all?

1 Like

#3

You can fold by level. Go to:

Edit > Code Folding >

There will be a list of levels there (all, level 1, 2, etc.) I use this to quickly fold all my PHP functions. Does this accomplish what you’re looking for?

Scott

1 Like

#4

Is there a way to fold only the comments? I don’t think the levels correspond to only the comments. I am mainly concerned with Java and the comments I mean are of the form:

/**
  *
  *
  */
public void test(){

}
0 Likes

#5

It looks like someone wrote a plug-in to handle folding comments. I haven’t tested it myself but it looks like it is probably worth a look:

Hope this helps,
Scott

0 Likes

#6

It works very well, thanks for your answer!

0 Likes

#7

I heartily recommend this plugin: https://github.com/facelessuser/RegReplace
It’s a little bit tricky to configure at first, but it’s extremely powerful and useful.

0 Likes

#8

[quote=“stirrell”]…


Scott[/quote]

I removed the “fold all” on load, because it was too aggressive, otherwise this is perfect.

[quote=“bizoo”]…
I heartily recommend this plugin: https://github.com/facelessuser/RegReplace
It’s a little bit tricky to configure at first, but it’s extremely powerful and useful.[/quote]

Thanks bizoo, I haven’t had the chance to take a look at it yet. I will soon.

0 Likes

#9

that is such a lovelyyyyy function :heart_eyes: I was looking for it, as well. Thanks!

0 Likes