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
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Vim-latex-devel mailing list
Vim-latex-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vim-latex-devel

Reply via email to