From d2015be809f31e3cd3eb7008e2d06c9f27fdae37 Mon Sep 17 00:00:00 2001 From: patnr Date: Thu, 12 Jun 2025 15:51:08 +0200 Subject: [PATCH 1/3] Fix indentation for comments --- indent/tex.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indent/tex.vim b/indent/tex.vim index 91908f801e..a07ea13052 100644 --- a/indent/tex.vim +++ b/indent/tex.vim @@ -53,7 +53,7 @@ function! VimtexIndent(lnum) abort " {{{1 " Use previous indentation for comments if l:line =~# '^\s*%' - return indent(a:lnum) + return indent(l:prev_lnum) endif " Remove comments before subsequent checks From 79524ca598c1318ce1443be442c370b0e14096be Mon Sep 17 00:00:00 2001 From: patnr Date: Sun, 27 Jul 2025 15:35:14 +0300 Subject: [PATCH 2/3] The comment was left untouched. But it should indeed get indented as well --- test/test-indentation/test_tikz_reference.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-indentation/test_tikz_reference.tex b/test/test-indentation/test_tikz_reference.tex index 645740cf71..c66499443c 100644 --- a/test/test-indentation/test_tikz_reference.tex +++ b/test/test-indentation/test_tikz_reference.tex @@ -10,7 +10,7 @@ \begin{tikzpicture} \draw [solid] let \p{I} = (0,0) in (1,1) -| (\x{I}-1cm,-1cm) node [yshift=-.25cm] {(i)}; - % Just some comment + % Just some comment \end{tikzpicture} \begin{tikzpicture} From 4e45d93899d039384ec733424a71440d0590aff6 Mon Sep 17 00:00:00 2001 From: patnr Date: Sun, 27 Jul 2025 15:43:24 +0300 Subject: [PATCH 3/3] This gets "wrongly" indented, but at least the rule is applied as intended --- test/test-indentation/test_tikz_reference.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-indentation/test_tikz_reference.tex b/test/test-indentation/test_tikz_reference.tex index c66499443c..dfadfa130e 100644 --- a/test/test-indentation/test_tikz_reference.tex +++ b/test/test-indentation/test_tikz_reference.tex @@ -19,7 +19,7 @@ (\x{I}-.75cm,-2.5) node [yshift=-.25cm] {(i)}; -% (ii) outer conductor of the contact head + % (ii) outer conductor of the contact head \coordinate (outerContactHead) at (.8,-1.7); \draw [solid] let \p{O} = (outerContactHead) in (outerContactHead) -- (\x{O},-2.5)