How to set default fold level?


#1

I would like to set the default fold level to 2. How is this done?


#2

I was able to figure this out thanks to helpful folks on Slack.

Here’s what I came up with:

atom.workspace.onDidAddTextEditor (event) ->
  atom.commands.dispatch(atom.views.getView(event.textEditor), 'editor:fold-at-indent-level-2')