1

Update generated nvim config

This commit is contained in:
2024-06-05 22:05:42 +02:00
parent 859ee3a2ba
commit 075fe5f587
1292 changed files with 152601 additions and 0 deletions

View File

@ -0,0 +1,14 @@
MYVIM ?= nvim --clean --headless
INMAKE := 1
export INMAKE
TESTS := $(wildcard test*.vim)
TESTS := $(TESTS:.vim=)
.PHONY: test $(TESTS)
test: $(TESTS)
$(TESTS):
@chronic $(MYVIM) -u $@.vim

View File

@ -0,0 +1,10 @@
set nocompatible
set runtimepath^=../..
filetype plugin on
" csc / Change surrounding command
call vimtex#test#keys("csctest\<cr>", '\cmd{foo}', '\test{foo}')
call vimtex#test#finished()

View File

@ -0,0 +1,24 @@
set nocompatible
set runtimepath^=../..
filetype plugin on
set wildmode=longest:full,full
set wildcharm=<c-z>
" cse / Change surrounding environment
" . / Dot repeat
call vimtex#test#keys("cse\<c-z>\<c-z>\<c-z>\<cr>",
\[
\ '\begin{foo}',
\ ' Foo',
\ '\end{foo}',
\],
\[
\ '\begin{abstract}',
\ ' Foo',
\ '\end{abstract}',
\])
call vimtex#test#finished()

View File

@ -0,0 +1,29 @@
set nocompatible
set runtimepath^=../..
filetype plugin on
" cse / Change surrounding environment
" . / Dot repeat
call vimtex#test#keys("csebaz\<cr>}j.",
\[
\ '\begin{foo}',
\ ' Foo',
\ '\end{foo}',
\ '',
\ '\begin{bar}',
\ ' Bar',
\ '\end{bar}',
\],
\[
\ '\begin{baz}',
\ ' Foo',
\ '\end{baz}',
\ '',
\ '\begin{baz}',
\ ' Bar',
\ '\end{baz}',
\])
call vimtex#test#finished()

View File

@ -0,0 +1,105 @@
set nocompatible
set runtimepath^=../..
filetype plugin indent on
syntax on
set shiftwidth=2
set expandtab
" cs$ -> $
call vimtex#test#keys("jjcs$$\<cr>",
\ [ 'text',
\ '\[',
\ ' math',
\ '\]',
\ 'text' ],
\ ['text $math$ text'])
" cs$ -> $
call vimtex#test#keys("3jcs$$\<cr>",
\ [ ' indented text',
\ '',
\ ' \[',
\ ' m = a t_h',
\ ' \]',
\ ' More text' ],
\ [ ' indented text',
\ '',
\ ' $m = a t_h$ More text'])
" cs$ -> $
call vimtex#test#keys("jjcs$$\<cr>",
\ [ ' indented text',
\ ' \[',
\ ' m = a t_h',
\ ' \]',
\ '',
\ ' More text' ],
\ [ ' indented text $m = a t_h$',
\ '',
\ ' More text'])
" cs$ -> \[
call vimtex#test#keys("f$cs$\\[\<cr>",
\ ['text $math$ text'],
\ ['text',
\ '\[',
\ ' math',
\ '\]',
\ 'text'])
" cs$ -> \[
call vimtex#test#keys("cs$\\[\<cr>",
\ ['$math$ text'],
\ ['\[',
\ ' math',
\ '\]',
\ 'text'])
" cs$ -> \[
call vimtex#test#keys("jcs$\\[\<cr>",
\ ['text',
\ '$',
\ 'math',
\ '$',
\ 'text'],
\ ['text',
\ '\[',
\ ' math',
\ '\]',
\ 'text'])
" cs$ -> \[
call vimtex#test#keys("f$cs$\\[\<cr>",
\ ['text $',
\ 'math',
\ '$ text'],
\ ['text',
\ '\[',
\ ' math',
\ '\]',
\ 'text'])
" cs$ -> \[
call vimtex#test#keys("jcs$\\[\<cr>",
\ [' text $f(x)',
\ ' = 1$ text'],
\ [' text',
\ ' \[',
\ ' f(x)',
\ ' = 1',
\ ' \]',
\ ' text'])
" cs$ -> \(
call vimtex#test#keys("jjcs$\\(\<cr>",
\ ['text',
\ '\[',
\ ' math',
\ '\]',
\ 'text' ],
\ ['text \(math\) text'])
call vimtex#test#finished()

View File

@ -0,0 +1,34 @@
set nocompatible
set runtimepath^=../..
filetype plugin indent on
set shiftwidth=2
" ]] / Close current delimiter or environment
call vimtex#test#keys('A]]',
\ '$\bigl( \left. a \right) ',
\ '$\bigl( \left. a \right) \bigr)')
call vimtex#test#keys('Go]]', [
\ '\documentclass{article}',
\ '\usepackage{stackengine}',
\ '\begin{document}',
\ '\begin{equation}',
\ ' \begin{array}{c}',
\ ' a = \stackunder{p6mm}{',
\ ' \left\{ b \right.',
\ ' }',
\], [
\ '\documentclass{article}',
\ '\usepackage{stackengine}',
\ '\begin{document}',
\ '\begin{equation}',
\ ' \begin{array}{c}',
\ ' a = \stackunder{p6mm}{',
\ ' \left\{ b \right.',
\ ' }',
\ ' \end{array}',
\])
call vimtex#test#finished()

View File

@ -0,0 +1,12 @@
set nocompatible
set runtimepath^=../..
filetype plugin on
" dsc / Delete surrounding command
call vimtex#test#keys('dsc', '\cmd{foo}', 'foo')
call vimtex#test#keys("f{ldsc", '$ \ce{a > b} $', '$ a > b $')
call vimtex#test#keys("f}hdsc", '$ \ce{a > b} $', '$ a > b $')
call vimtex#test#finished()

View File

@ -0,0 +1,15 @@
set nocompatible
set runtimepath^=../..
filetype plugin on
" dse / Delete surrounding environment
call vimtex#test#keys('dsedse',
\[
\ '\begin{test}',
\ ' \begin{center} a \end{center}',
\ '\end{test}',
\], ' a ')
call vimtex#test#finished()

View File

@ -0,0 +1,30 @@
set nocompatible
set runtimepath^=../..
filetype plugin on
syntax on
" ds$ / Delete surrounding math ($...$ and \[...\])
call vimtex#test#keys('f$ds$',
\ 'for $ 2+2 = 4 = 3 $ etter',
\ 'for 2+2 = 4 = 3 etter')
call vimtex#test#keys('jds$',
\[
\ 'asd $',
\ '2+2 = 4',
\ '$ asd',
\],
\[
\ 'asd',
\ '2+2 = 4',
\ 'asd',
\])
call vimtex#test#keys('ds$',
\[
\ '\[',
\ '2+2 = 4',
\ '\]',
\], '2+2 = 4')
call vimtex#test#finished()

View File

@ -0,0 +1,23 @@
set nocompatible
set runtimepath^=../..
filetype plugin on
" tsd / Toggle surrounding delimiter
call vimtex#test#keys('3jtsd', [
\ '$\bigl(\begin{smallmatrix}',
\ ' \Q^* & \\',
\ ' & 1 \\',
\ '\end{smallmatrix}\bigr)$',
\], [
\ '$(\begin{smallmatrix}',
\ ' \Q^* & \\',
\ ' & 1 \\',
\ '\end{smallmatrix})$',
\])
" Cf. #1620
call vimtex#test#keys('f+tsd', '\( a^2 + b^2 = c^2 \)', '\( a^2 + b^2 = c^2 \)')
call vimtex#test#finished()

View File

@ -0,0 +1,14 @@
set nocompatible
set runtimepath^=../..
filetype plugin on
" F7 / Insert command (insert mode, normal mode and visual mode)
call vimtex#test#keys("lla\<f7>}", 'foobar', '\foo{bar}')
call vimtex#test#keys("llla\<f7>bar}", 'foo*', '\foo*{bar}')
call vimtex#test#keys("llla\<f7>}", 'foo*bar', '\foo*{bar}')
call vimtex#test#keys("fbve\<f7>emph\<cr>", 'foobar', 'foo\emph{bar}')
call vimtex#test#keys("\<f7>emph\<cr>", 'foo', '\emph{foo}')
call vimtex#test#finished()

View File

@ -0,0 +1,16 @@
set nocompatible
set runtimepath^=../..
filetype plugin on
" tsb / Toggle line break
for [s:in, s:out] in [
\ ['abc', 'abc \\'],
\ [' a + b = c', ' a + b = c \\'],
\ ['abc \\', 'abc'],
\ ['abc\\', 'abc'],
\]
call vimtex#test#keys('tsb', s:in, s:out)
endfor
call vimtex#test#finished()

View File

@ -0,0 +1,28 @@
set nocompatible
set runtimepath^=../..
filetype plugin on
let g:vimtex_toggle_fractions = {
\ 'INLINE': 'frac',
\ 'frac': 'dfrac',
\ 'dfrac': 'cfrac',
\ 'cfrac': 'INLINE',
\}
" tsf / Toggle surrounding fraction
for [s:in, s:out] in [
\ ['$x / (x-1)$', '$\frac{x}{x-1}$'],
\ ['$\frac{x}{x-1}$', '$\dfrac{x}{x-1}$'],
\ ['$\dfrac{x}{x-1}$', '$\cfrac{x}{x-1}$'],
\ ['$\cfrac{x}{x-1}$', '$x/(x-1)$'],
\]
if s:in =~# '\/'
call vimtex#test#keys('f/ltsf', s:in, s:out)
call vimtex#test#keys('f/htsf', s:in, s:out)
else
call vimtex#test#keys('f{tsf', s:in, s:out)
endif
endfor
call vimtex#test#finished()

View File

@ -0,0 +1,58 @@
set nocompatible
set runtimepath^=../..
filetype plugin on
" tsf / Toggle surrounding fraction
for [s:in, s:out] in [
\ ['$e^{a/b}$', '$e^{\frac{a}{b}}$'],
\ ['$n^{1/2}$', '$n^{\frac{1}{2}}$'],
\ ['$n^{-1/2}$', '$n^{-\frac{1}{2}}$'],
\ ['$(0/q)$', '$(\frac{0}{q})$'],
\ ['$\frac{x+1}{x-1}$', '$(x+1)/(x-1)$'],
\ ['$\frac {x+1} {x-1}$', '$(x+1)/(x-1)$'],
\ ['$\frac {x-1} x$', '$(x-1)/x$'],
\ ['$\frac x {x-1}$', '$x/(x-1)$'],
\ ['$x / (x-1)$', '$\frac{x}{x-1}$'],
\ ['$(x-1) /x$', '$\frac{x-1}{x}$'],
\ ['$(x+1) /(x-1)$', '$\frac{x+1}{x-1}$'],
\ ['$(x+1)/ (x-1)$', '$\frac{x+1}{x-1}$'],
\ ['$\alpha/\mu$', '$\frac{\alpha}{\mu}$'],
\ ['$\frac{\alpha}{\mu}$', '$\alpha/\mu$'],
\ ['$(r+t)/((\mu))$', '$\frac{r+t}{(\mu)}$'],
\ ['$((\mu))/(r+t)$', '$\frac{(\mu)}{r+t}$'],
\ ['$\frac{\delta_{02}}{\delta_{02} + \delta_{01}}$',
\ '$(\delta_{02})/(\delta_{02} + \delta_{01})$'],
\ ['$(\delta_{02})/(\delta_{02} + \delta_{01})$',
\ '$\frac{\delta_{02}}{\delta_{02} + \delta_{01}}$'],
\ ['\(a/p_\text{b}\)', '\(\frac{a}{p_\text{b}}\)'],
\ ['$f(x+y)/g(z)$', '$\frac{f(x+y)}{g(z)}$'],
\ ['$f(x)g(y)/h(z)$', '$f(x)\frac{g(y)}{h(z)}$'],
\ ['$\dfrac{x+1}{x-1}$', '$(x+1)/(x-1)$'],
\]
if s:in =~# '\/'
call vimtex#test#keys('f/ltsf', s:in, s:out)
call vimtex#test#keys('f/htsf', s:in, s:out)
else
call vimtex#test#keys('f{tsf', s:in, s:out)
endif
endfor
" tsf / Toggle surrounding fraction (visual mode)
call vimtex#test#keys('f$lvf$htsf',
\ 'testing $inline frac / something$ more text',
\ 'testing $\frac{inline frac}{something}$ more text')
call vimtex#test#keys('f/bvf$htsf',
\ 'testing $inline frac / something$ more text',
\ 'testing $inline \frac{frac}{something}$ more text')
call vimtex#test#keys('f/bvtttsf',
\ 'testing $inline frac / something$ more text',
\ 'testing $inline \frac{frac}{some}thing$ more text')
call vimtex#test#keys('f(v$hhtsf',
\ '$(\delta_{02})/(\delta_{02} + \delta_{01})$',
\ '$\frac{\delta_{02}}{\delta_{02} + \delta_{01}}$')
call vimtex#test#keys('f\v$hhtsf',
\ '$\frac{\delta_{02}}{\delta_{02} + \delta_{01}}$',
\ '$(\delta_{02})/(\delta_{02} + \delta_{01})$')
call vimtex#test#finished()