mirror of
https://github.com/tpope/vim-haml.git
synced 2026-01-20 22:32:49 +08:00
Don't try to indent properties that follow mixins
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user