Don't try to indent properties that follow mixins

This commit is contained in:
Austin Taylor
2010-10-08 11:11:09 -04:00
committed by Tim Pope
parent 47c4dff622
commit 79041b05a7

View File

@@ -17,7 +17,8 @@ if exists("*GetSassIndent")
finish
endif
let s:property = '^\s*:\|^\s*[[:alnum:]-]\+\%(:\|\s*=\)'
let s:property = '^\s*:\|^\s*[[:alnum:]#{}-]\+\%(:\|\s*=\)'
let s:extend = '^\s*\%(@extend\|+\)'
function! GetSassIndent()
let lnum = prevnonblank(v:lnum-1)
@@ -27,7 +28,7 @@ function! GetSassIndent()
let line = substitute(line,'^\s\+','','')
let indent = indent(lnum)
let cindent = indent(v:lnum)
if line !~ s:property && cline =~ s:property
if line !~ s:property && line !~ s:extend && cline =~ s:property
return indent + &sw
"elseif line =~ s:property && cline !~ s:property
"return indent - &sw