yomybaby / atom-titanium

[DEPRECATED] Atom package for Titanium Alloy
https://atom.io/packages/titanium-alloy
MIT License
49 stars 11 forks source link

Make space between new generated style and controller method #56

Closed hansemannn closed 7 years ago

hansemannn commented 7 years ago

Hey @yomybaby,

would be nice to generate new TSS styles with a space (new line) between the brackets: Before:

"#myStyle": {
}

After:

"#myStyle": {

}

It's a really really minor change, so maybe you can check it in between other stuff you work on. Thanks man!

EDIT: Same for controller methods:

Before:

function doStuff(e) {
}

After:

function doStuff(e) {

}
yomybaby commented 7 years ago

You can change generation template on package settings already. 😄

Check this out previous releases note: https://github.com/yomybaby/atom-titanium/releases/tag/v0.11.2

hansemannn commented 7 years ago

Sweet! What prevents you from making it default then? :)

yomybaby commented 7 years ago

There is two changes in your suggestion

I know the best is :

  // _ is cursor position
  function doStuff(e) {
    _
  }

But I couldn't found a best way to add indent correctly(2 space or 4 space or tab) and to move cursor.