Skip to content

Conversation

@mltucker
Copy link
Contributor

Hey,

It was bugging me that "}" didn't indent. Maybe there's an emacs-wide setting, but pull if you're interested!

-Mark

@blastura
Copy link
Owner

Hey nice, gonna try it out.

Maybe something like that will be added to CSS-mode and thus also this mode. Feels like it is behavior that some might want and some don't. I have stuff like these for my global bindings:

(global-set-key "\C-o" (lambda() (interactive)
                     (save-excursion (newline-and-indent))
                     (indent-according-to-mode)))

And of course C-j bound to (newline-and-indent) and constantly hitting C-i all the time, so I really never had an issue with this.

I have not done any overly complex mixtures of scss in this mode, have you encountered any combinations where css-mode incorrectly indents scss?

-- Anton

@mltucker
Copy link
Contributor Author

Hey Anton,

After I did sent the pull request, I saw it on the todo-list for css-mode. I also hit C-i all the time (and have C-j bound to reindent-then-newline-and-indent :-)), but after doing a ton of javascript lately it felt unnatural to not have it auto-indent. If you also think it's useful, maybe it's worth having a defcustom -- that's what js-mode has with js-auto-indent-flag which defaults to t. I'll have to try that C-o binding.

I have had the pleasure to use lots of nested scss rules, and the indentation has always worked. There is a syntax-highlighting bug with mixins, but it's not a big deal. Try this: @mixin left($dist). I'll give you a pull request if I fix it.

Thanks again,

-Mark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants