billymoon / Stylus

Stylus Package for Sublime Text 2 / 3
Other
129 stars 31 forks source link

Need autoindentations after selectors #12

Closed tiye closed 10 years ago

tiye commented 11 years ago

For example when I write:

body
  color hsl(0,30,60)

there should be an indentation when I press Enter behind the selector body.

grassator commented 10 years ago

:tada: should work now

tiye commented 10 years ago

Comfirmed in Sublime Text 3, Thanks :)

tbnv commented 9 years ago

It looks like there are some inconsistencies regarding the auto-indent after pressing the enter key. I don't know exactly why, but sometimes it works and sometimes it doesn't.

grassator commented 9 years ago

@tbnv could you please provide concrete examples where auto-indentation doesn't work?

tbnv commented 9 years ago

@grassator I really can't explain steps to reproduce that, it appears randomly. The only thing I can say is that it doesn't work more often than it does work. Here is a quick test I did on a new file, all packages are disabled (except Package Control and Stylus) : video.

grassator commented 9 years ago

@tbnv it looks like there is a bug with scope matcher in sublime commands when it's the end of the file. To work around that I've switched to a custom python command that has much more complicated rules for deciding if there should be an auto-indent.

Please let me know if there are any cases now when it behaves not as it should.