Little help needed


#1

Hi,
desperately need little help, not for lack of ability (I’m programmer 60+ old), but for lack of time. I have no time for study Atom internals right now.
Two things:

  • increase font size of file tree
  • right after open any file (for show or edit) run automatically Fold All action.
    Any help it will be appreciated and rewarded (I know, nobody works on order without being paid)
    Contact me, pls, at zio(point)pietro(point)53(gmail)
    Thanks in advance.

#2

Add this to styles.less:

.tree-view {
  font-size: 1.1em;
}

right after open any file (for show or edit) run automatically Fold All action.

Add this to init.coffee:

atom.workspace.onDidOpen (evt) ->
  evt.item.foldAll()

Atom has pretty solid API documentation, so there’s very little internals study necessary to get started on writing little hacks.


#3

Thanks for quick response. But, there is no rose without thorns:
Both solutions work well, unfortunately the second one with very nasty side effect:
Find in project stop works, instantly shows No result found, as well as Todo-Show, which vice versa results in endless run, w/o result, too.

I did my homework (“very little internals study” :hushed: was for me, Atom newbie 2 hrs)

atom.workspace.onDidAddTextEditor (evt) ->  
    evt.textEditor.foldAll()

so only text editors take foldAll() callback


#4

Interesting. I figured the worst that would happen would be Atom complaining about foldAll() not being a function for a pane item that isn’t a TextEditor. Good to know.