Support subequations label completion

This commit is contained in:
Karl Yngve Lervåg 2015-12-08 21:16:13 +01:00
parent 09a9d0f9de
commit e9f2cd4067
2 changed files with 11 additions and 2 deletions

View File

@ -395,8 +395,7 @@ function! s:labels_parse_number(num_tree) " {{{1
return s:labels_parse_number(a:num_tree[l:index])
endif
else
let l:num = str2nr(a:num_tree)
return l:num > 0 ? l:num : '-'
return str2nr(a:num_tree) > 0 ? a:num_tree : '-'
endif
endfunction

View File

@ -1,5 +1,6 @@
\documentclass{article}
\usepackage{biblatex}
\usepackage{amsmath}
\addbibresource{biblatex-examples.bib}
\addbibresource{local1.bib}
\addbibresource{~/.vim/bundle/vim-latex/test/completion/local2.bib}
@ -68,4 +69,13 @@ To test label completion you need to compile the document first!
f(x) = 10
\end{equation}
\begin{subequations}
\begin{align}
\label{eq:test11a}
f(x) &= 11a \\
\label{eq:test11b}
f(x) &= 11b
\end{align}
\end{subequations}
\end{document}