0

does anyone know how to fold code inside google app script editor ?

it's very hard to read/debug long code inside online editor.

I did some search on google and I couldn't find any result related to this matter.

Rubén
  • 29,320
  • 9
  • 61
  • 145
newbie
  • 104
  • 2
  • 12
  • 3
    You cannot. The alternative is local development using clasp. Consider also using multiple files and functions with a single responsibility. – tehhowch Oct 19 '19 at 11:54
  • thanks. It's hard to believe why google forgot to add such a feature – newbie Oct 19 '19 at 12:01
  • 3
    [There is a feature request for this under Google's issue tracker](https://issuetracker.google.com/issues/64307043). You can help to increase visibility for this issue by starring it. – TheAddonDepot Oct 19 '19 at 12:29

1 Answers1

1

The Google Apps Script editor compared with Visual Studio Code1 and other IDEs is very limited. Since Google added CLASP to Google Apps Script "family" it's very unlikely that it will be added as a built-in feature but maybe this could be added by using a web browser extension.

On the Chrome Webstore there are already some Chrome extensions that extends the Google Apps Script editor but I don't know if already exists one to add code folding.

Notes

  1. VSC is mentioned that is should be used for code auto-completion in https://developers.google.com/apps-script/guides/typescript

Related

References

Rubén
  • 29,320
  • 9
  • 61
  • 145