I use https://github.com/cakebaker/scss-syntax.vim for syntax highlighting SCSS (or SASS) files on vim, which works very well for syntax highlighting. However, the plugin does not come with an indent file and am having trouble writing one.
I would like to set the indent to look like this:
However, if i do gg=G
, I get:
I suspect that it does not understand nested indent based on braces. I tried all the different combinations of
set cindent
set nocindent
set autoindent
set smartindent
and tried to use the code from Tab key == 4 spaces and auto-indent after curly braces in Vim , including
set tabstop=2
set shiftwidth=2
set expandtab
...but nested braces indent never seems to work.
I believe that I might want to write a custom indent file, and all I need is indentation based on braces with nested levels. How should I go about this? If someone has an indentation file for filetypes with similar syntax, that will be great as well.