Hi,
I use vim-latex-suite, and sometimes the indent is going wrong, I think it's
due to the way that commented line are used.
for this example :
\begin{itemize}
\item ldsfkjlfj
\item dsflkjqlfj
% fsdqlkjflsdjql lfdskjfljsd
\end{itemize}
the indentation of \end{itemize} is wrong (with the default indent/tex.vim
from latex-suite we get :
\begin{itemize}
\item ldsfkjlfj
\item dsflkjqlfj
% fsdqlkjflsdjql lfdskjfljsd
\end{itemize}
so here is a little patch for indent/tex.vim that will provide the right
solution I think :
which is in this case :
\begin{itemize}
\item ldsfkjlfj
\item dsflkjqlfj
% fsdqlkjflsdjql lfdskjfljsd
\end{itemize}
(the comment line is indent more because of g_tex_indent_items, and I like
it)
so the patch is adding this after line 81 of indent/tex.vim :
while lnum > 0 && getline(lnum) =~ '^\s*%'
let lnum = prevnonblank(lnum-1)
endwhile
it's extracted from tex.vim by charles campbell:
" if the current line doesn't begin with a '%', use its indent
" (ie. skip over preceding comment lines)
hope this help, and hope this will be in the next latex-suite version :D.
NB: the form here :
http://vim-latex.sourceforge.net/index.php?subject=contact&title=Contactdoesn't
seems to work anymore.. (with google-chrome it doesn't works..)
- setog
|