vim-smartinput
vim-smartinput copied to clipboard
Curly brace closure in SASS/SCSS works poorly
Maybe I'm doing something wrong, but here's how it works out when trying to do nested braces in SASS:
body {
div {
}
}
Instead of indenting the inner closing brace, it shifts it all the way over to left. Thoughts?
Thank you for the feedback. I'll investigate it later.
I've investigated the problem. But I'm confused about your question.
First, the example you given seems to be written in SCSS, not SASS. Because SASS use indentation instead of {...}
to denote a block of properties. Did you really mean that there is a problem to edit SASS file with vim-smartinput?
Second, even if you actually meant SCSS, SCSS is correctly indented with or without vim-smartinput. So that I suspect that you used wrong filetype to edit SCSS file (such as .sass
).
Yeah, sorry for confusing the issue by even mentioning SASS. SCSS is the syntax I'm using.
SCSS is correctly indented with or without vim-smartinput.
I'm not really sure where my problem is, then. When I remove vim-smartinput, the SCSS files indent correctly, however, they do not close the curly braces automatically. When I add vim-smartinput, the curly braces close (like you'd expect), but the closing brace is not indented.
On the first level selector, it works fine:
body {
*cursor here
}
But for any nested selector:
body {
head {
*cursor here
}
}
When I run :set filetype?
, the result is indeed scss
, so I think I'm good there. And I'm running Vim 7.3 with SCSS support...
Okay. I'll reinvestigate it later.
Thanks, I appreciate it!
I can confirm this. I'm a new user of the plugin and just had a look through the issues here to see what I might run into. SCSS is indeed behaving the way @kendagriff is describing.