diff --git a/indent/tex.vim b/indent/tex.vim index 90185de..7f62ccb 100644 --- a/indent/tex.vim +++ b/indent/tex.vim @@ -4,7 +4,7 @@ " Email: karl.yngve@gmail.com " -if exists("b:did_indent") +if exists('b:did_indent') finish endif let b:did_indent = 1 @@ -23,7 +23,7 @@ setlocal indentkeys+=[,(,{,),},],\&,=\\item function! s:vimtex_indent() " {{{1 " Find a non-blank non-comment line above the current line let lnum = prevnonblank(v:lnum - 1) - while lnum != 0 && getline(lnum) =~ '^\s*%' + while lnum != 0 && getline(lnum) =~# '^\s*%' let lnum = prevnonblank(lnum - 1) endwhile @@ -37,7 +37,7 @@ function! s:vimtex_indent() " {{{1 let pline = substitute(getline(lnum), '\\\@ 0 && pline =~ ';\s*$' + if s:tikz_indented > 0 && pline =~# ';\s*$' let ind -= &sw let s:tikz_indented -= 1 endif