chore: remove debug messages; refact code

This commit is contained in:
yemai
2019-08-08 11:19:01 +08:00
parent b398419918
commit 3229d3f562

View File

@@ -100,10 +100,7 @@ function! GetVueIndent()
let cursyns = s:SynsEOL(v:lnum) let cursyns = s:SynsEOL(v:lnum)
let cursyn = get(cursyns, 0) let cursyn = get(cursyns, 0)
if s:SynPug(prevsyn) if s:SynHTML(prevsyn)
call s:Log('syntax: pug')
let ind = GetPugIndent()
elseif s:SynHTML(prevsyn)
call s:Log('syntax: xml') call s:Log('syntax: xml')
let ind = XmlIndentGet(v:lnum, 0) let ind = XmlIndentGet(v:lnum, 0)
if prevline =~? s:empty_tag if prevline =~? s:empty_tag
@@ -119,6 +116,9 @@ function! GetVueIndent()
if prevline =~? s:end_tag if prevline =~? s:end_tag
let ind = ind + &sw let ind = ind + &sw
endif endif
elseif s:SynPug(prevsyn)
call s:Log('syntax: pug')
let ind = GetPugIndent()
elseif s:SynSASS(prevsyn) elseif s:SynSASS(prevsyn)
call s:Log('syntax: sass') call s:Log('syntax: sass')
let ind = GetSassIndent() let ind = GetSassIndent()
@@ -128,10 +128,8 @@ function! GetVueIndent()
else else
call s:Log('syntax: javascript') call s:Log('syntax: javascript')
if len(b:javascript_indentexpr) if len(b:javascript_indentexpr)
echom 'eval'
let ind = eval(b:javascript_indentexpr) let ind = eval(b:javascript_indentexpr)
else else
echom 'cindent'
let ind = cindent(v:lnum) let ind = cindent(v:lnum)
endif endif
endif endif