Dear all and YiChao Zhou,

Currently shiftwidth is inserted after a line containing \begin, which gives

\begin{pmatrix} 0 \\ 1 \\ \end{pmatrix}
  \begin{pmatrix} 1 \\ 0 \\ \end{pmatrix}

This patch avoids indent after one-line environment, which gives

\begin{pmatrix} 0 \\ 1 \\ \end{pmatrix}
\begin{pmatrix} 1 \\ 0 \\ \end{pmatrix}

Best Regards, 
-- 
Eisuke Kawashima

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff --git a/runtime/indent/tex.vim b/runtime/indent/tex.vim
index 0150bb9..ca137a6 100644
--- a/runtime/indent/tex.vim
+++ b/runtime/indent/tex.vim
@@ -209,7 +209,7 @@ function! GetTeXIndent() " {{{
     ""if line =~ '^\s*\\begin{\(.*\)}'  && line !~ 'verbatim' 
     " LH modification : \begin does not always start a line
     " ZYC modification : \end after \begin won't cause wrong indent anymore
-    if line =~ '\\begin{.*}' && line !~ g:tex_noindent_env
+    if line =~ '\\begin{.*}' && line !~ '\\end{.*}' && line !~ g:tex_noindent_env
         let ind = ind + &sw
         let stay = 0
 

Raspunde prin e-mail lui