Update generated nvim config
This commit is contained in:
@ -0,0 +1,17 @@
|
||||
MYVIM ?= nvim --clean --headless
|
||||
|
||||
INMAKE := 1
|
||||
export INMAKE
|
||||
|
||||
TESTS := $(wildcard *.vim)
|
||||
TESTS := $(TESTS:.vim=)
|
||||
|
||||
.PHONY: test $(TESTS) test-cleanup
|
||||
|
||||
test: $(TESTS) test-cleanup
|
||||
|
||||
$(TESTS):
|
||||
@$(MYVIM) -u $@.vim
|
||||
|
||||
test-cleanup: $(TESTS)
|
||||
@rm -f nvim_servernames.log
|
||||
@ -0,0 +1,15 @@
|
||||
\relax
|
||||
\newlabel{eq:main-is-working}{{1}{1}}
|
||||
\newlabel{eq:main-is-working@cref}{{[equation][1][]1}{[1][1][]1}}
|
||||
\newlabel{eq:test11a}{{2a}{1}}
|
||||
\newlabel{eq:test11a@cref}{{[subequation][1][2]2a}{[1][1][]1}}
|
||||
\newlabel{eq:test11b}{{2b}{1}}
|
||||
\newlabel{eq:test11b@cref}{{[subequation][2][2]2b}{[1][1][]1}}
|
||||
\@input{test1/sub1.aux}
|
||||
\@input{"test1/sub2.aux}
|
||||
\@input{test1/sub4.aux}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {2}sub3 with spaces}{4}\protected@file@percent }
|
||||
\newlabel{sec:sub3 with spaces}{{2}{4}}
|
||||
\newlabel{sec:sub3 with spaces@cref}{{[section][2][]2}{[1][4][]4}}
|
||||
\newlabel{eq:sub3 with spaces}{{14}{4}}
|
||||
\newlabel{eq:sub3 with spaces@cref}{{[equation][14][]14}{[1][4][]4}}
|
||||
@ -0,0 +1,45 @@
|
||||
\documentclass{article}
|
||||
\usepackage{amsmath}
|
||||
\usepackage{cleveref}
|
||||
|
||||
\newtheorem{theorem}{Theorem}
|
||||
\newtheorem{proposition}{Proposition}
|
||||
|
||||
\includeonly{test1/sub1,test1/sub2 with spaces}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{equation}
|
||||
f(x) = 42
|
||||
\label{eq:main-is-working}
|
||||
\end{equation}
|
||||
|
||||
\begin{subequations}
|
||||
\begin{align}
|
||||
\label{eq:test11a}
|
||||
f(x) &= 11a \\
|
||||
\label{eq:test11b}
|
||||
f(x) &= 11b
|
||||
\end{align}
|
||||
\end{subequations}
|
||||
|
||||
% To test label completion you need to compile the document first!
|
||||
|
||||
% Examples that should all work:
|
||||
equation (\ref{eq:main-is-working}) \\
|
||||
equation \eqref{eq:sub1-is-working} \\
|
||||
\cref{eq:test1,eq:test2} \\
|
||||
\crefrange{eq:test1}{eq:test10} \\
|
||||
\cref{eq:sub3 with spaces} on \cpageref{sec:sub3 with spaces} \\
|
||||
\cref{sec:sub1,sec:sub3 with spaces} \\
|
||||
\crefrange{sec:sub1}{sec:sub3 with spaces} \\
|
||||
|
||||
\include{test1/sub1}
|
||||
|
||||
\include{"test1/sub2\space with\space spaces"}
|
||||
|
||||
\include{test1/sub4}
|
||||
|
||||
\input{"test1/sub3\space with\space spaces"}
|
||||
|
||||
\end{document}
|
||||
@ -0,0 +1,20 @@
|
||||
set nocompatible
|
||||
let &rtp = '../..,' . &rtp
|
||||
filetype plugin on
|
||||
|
||||
nnoremap q :qall!<cr>
|
||||
|
||||
let g:vimtex_cache_root = '.'
|
||||
let g:vimtex_cache_persistent = 0
|
||||
|
||||
silent edit test1.tex
|
||||
|
||||
if empty($INMAKE) | finish | endif
|
||||
|
||||
let s:candidates = vimtex#test#completion('\ref{', '')
|
||||
call assert_equal(len(s:candidates), 21)
|
||||
|
||||
let s:candidates = vimtex#test#completion('\eqref{', '')
|
||||
call assert_equal(len(s:candidates), 15)
|
||||
|
||||
call vimtex#test#finished()
|
||||
@ -0,0 +1,55 @@
|
||||
\relax
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {1}sub1}{2}\protected@file@percent }
|
||||
\newlabel{sec:sub1}{{1}{2}}
|
||||
\newlabel{sec:sub1@cref}{{[section][1][]1}{[1][2][]2}}
|
||||
\newlabel{eq:sub1-is-working}{{3}{2}}
|
||||
\newlabel{eq:sub1-is-working@cref}{{[equation][3][]3}{[1][2][]2}}
|
||||
\newlabel{th:first}{{1}{2}}
|
||||
\newlabel{th:first@cref}{{[theorem][1][]1}{[1][2][]2}}
|
||||
\newlabel{th:second}{{2}{2}}
|
||||
\newlabel{th:second@cref}{{[theorem][2][]2}{[1][2][]2}}
|
||||
\newlabel{prop:first}{{1}{2}}
|
||||
\newlabel{prop:first@cref}{{[proposition][1][]1}{[1][2][]2}}
|
||||
\newlabel{prop:second}{{2}{2}}
|
||||
\newlabel{prop:second@cref}{{[proposition][2][]2}{[1][2][]2}}
|
||||
\newlabel{eq:test1}{{4}{2}}
|
||||
\newlabel{eq:test1@cref}{{[equation][4][]4}{[1][2][]2}}
|
||||
\newlabel{eq:test2}{{5}{2}}
|
||||
\newlabel{eq:test2@cref}{{[equation][5][]5}{[1][2][]2}}
|
||||
\newlabel{eq:test3}{{6}{2}}
|
||||
\newlabel{eq:test3@cref}{{[equation][6][]6}{[1][2][]2}}
|
||||
\newlabel{eq:test4}{{7}{2}}
|
||||
\newlabel{eq:test4@cref}{{[equation][7][]7}{[1][2][]2}}
|
||||
\newlabel{eq:test5}{{8}{2}}
|
||||
\newlabel{eq:test5@cref}{{[equation][8][]8}{[1][2][]2}}
|
||||
\newlabel{eq:test6}{{9}{2}}
|
||||
\newlabel{eq:test6@cref}{{[equation][9][]9}{[1][2][]2}}
|
||||
\newlabel{eq:test7}{{10}{2}}
|
||||
\newlabel{eq:test7@cref}{{[equation][10][]10}{[1][2][]2}}
|
||||
\newlabel{eq:test8}{{11}{2}}
|
||||
\newlabel{eq:test8@cref}{{[equation][11][]11}{[1][2][]2}}
|
||||
\newlabel{eq:test9}{{12}{2}}
|
||||
\newlabel{eq:test9@cref}{{[equation][12][]12}{[1][2][]2}}
|
||||
\newlabel{eq:test10}{{13}{2}}
|
||||
\newlabel{eq:test10@cref}{{[equation][13][]13}{[1][2][]2}}
|
||||
\@setckpt{test1/sub1}{
|
||||
\setcounter{page}{3}
|
||||
\setcounter{equation}{13}
|
||||
\setcounter{enumi}{0}
|
||||
\setcounter{enumii}{0}
|
||||
\setcounter{enumiii}{0}
|
||||
\setcounter{enumiv}{0}
|
||||
\setcounter{footnote}{0}
|
||||
\setcounter{mpfootnote}{0}
|
||||
\setcounter{part}{0}
|
||||
\setcounter{section}{1}
|
||||
\setcounter{subsection}{0}
|
||||
\setcounter{subsubsection}{0}
|
||||
\setcounter{paragraph}{0}
|
||||
\setcounter{subparagraph}{0}
|
||||
\setcounter{figure}{0}
|
||||
\setcounter{table}{0}
|
||||
\setcounter{parentequation}{0}
|
||||
\setcounter{theorem}{2}
|
||||
\setcounter{proposition}{2}
|
||||
}
|
||||
@ -0,0 +1,77 @@
|
||||
\section{sub1}
|
||||
\label{sec:sub1}
|
||||
|
||||
\begin{equation}
|
||||
f(x) = 42
|
||||
\label{eq:sub1-is-working}
|
||||
\end{equation}
|
||||
|
||||
\begin{theorem}
|
||||
\label{th:first}
|
||||
test
|
||||
\end{theorem}
|
||||
|
||||
\begin{theorem}
|
||||
\label{th:second}
|
||||
test
|
||||
\end{theorem}
|
||||
|
||||
\begin{proposition}
|
||||
\label{prop:first}
|
||||
test
|
||||
\end{proposition}
|
||||
|
||||
\begin{proposition}
|
||||
\label{prop:second}
|
||||
test
|
||||
\end{proposition}
|
||||
|
||||
\begin{equation}
|
||||
\label{eq:test1}
|
||||
f(x) = 1
|
||||
\end{equation}
|
||||
|
||||
\begin{equation}
|
||||
\label{eq:test2}
|
||||
f(x) = 2
|
||||
\end{equation}
|
||||
|
||||
\begin{equation}
|
||||
\label{eq:test3}
|
||||
f(x) = 3
|
||||
\end{equation}
|
||||
|
||||
\begin{equation}
|
||||
\label{eq:test4}
|
||||
f(x) = 4
|
||||
\end{equation}
|
||||
|
||||
\begin{equation}
|
||||
\label{eq:test5}
|
||||
f(x) = 5
|
||||
\end{equation}
|
||||
|
||||
\begin{equation}
|
||||
\label{eq:test6}
|
||||
f(x) = 6
|
||||
\end{equation}
|
||||
|
||||
\begin{equation}
|
||||
\label{eq:test7}
|
||||
f(x) = 7
|
||||
\end{equation}
|
||||
|
||||
\begin{equation}
|
||||
\label{eq:test8}
|
||||
f(x) = 8
|
||||
\end{equation}
|
||||
|
||||
\begin{equation}
|
||||
\label{eq:test9}
|
||||
f(x) = 9
|
||||
\end{equation}
|
||||
|
||||
\begin{equation}
|
||||
\label{eq:test10}
|
||||
f(x) = 10
|
||||
\end{equation}
|
||||
@ -0,0 +1,7 @@
|
||||
\section{sub2 with spaces}
|
||||
\label{sec:sub2 with spaces}
|
||||
|
||||
\begin{equation}
|
||||
f(x) = 42
|
||||
\label{eq:included sub with spaces is working}
|
||||
\end{equation}
|
||||
@ -0,0 +1,6 @@
|
||||
\section{sub3 with spaces}\label{sec:sub3 with spaces}
|
||||
|
||||
\begin{equation}
|
||||
f(x) = 42
|
||||
\label{eq:sub3 with spaces}
|
||||
\end{equation}
|
||||
@ -0,0 +1,4 @@
|
||||
\section{sub4}
|
||||
\label{sec:sub4 not included}
|
||||
|
||||
This should not be included!
|
||||
@ -0,0 +1,10 @@
|
||||
\documentclass{article}
|
||||
\usepackage{xr}
|
||||
\externaldocument{test2/input1}
|
||||
\externaldocument[1-]{test2/input2}
|
||||
\begin{document}
|
||||
|
||||
It would be great to be able to use omnicomplete in this file in order to
|
||||
reference equations, e.g.~\ref{eq_1} and \ref{1-eq_2}.
|
||||
|
||||
\end{document}
|
||||
@ -0,0 +1,20 @@
|
||||
set nocompatible
|
||||
let &rtp = '../..,' . &rtp
|
||||
filetype plugin on
|
||||
|
||||
nnoremap q :qall!<cr>
|
||||
|
||||
let g:vimtex_cache_root = '.'
|
||||
let g:vimtex_cache_persistent = 0
|
||||
|
||||
silent edit test2.tex
|
||||
|
||||
if empty($INMAKE) | finish | endif
|
||||
|
||||
let s:candidates = vimtex#test#completion('\ref{', '')
|
||||
call assert_equal(len(s:candidates), 2)
|
||||
|
||||
let s:candidates = vimtex#test#completion('\ref{', '1-')
|
||||
call assert_equal(len(s:candidates), 1)
|
||||
|
||||
call vimtex#test#finished()
|
||||
@ -0,0 +1,2 @@
|
||||
\relax
|
||||
\newlabel{eq_1}{{1}{1}{}}
|
||||
@ -0,0 +1,2 @@
|
||||
\relax
|
||||
\newlabel{eq_2}{{2}{1}{}}
|
||||
Reference in New Issue
Block a user