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,9 @@
.PHONY: test
MYVIM ?= nvim --clean --headless
INMAKE := 1
export INMAKE
test:
@$(MYVIM) -u test.vim

View File

@ -0,0 +1,119 @@
@book{Ernst1987,
author = {Ernst, Richard R. and Bodenhausen, Geoffrey and Wokaun, Alexander},
title = {Principles of Nuclear Magnetic Resonance in One and Two Dimensions},
year = {1987},
publisher = {Clarendon Press},
isbn = {9780198556299},
address = {Oxford, U.K.},
}
@COMMENT {This is to be ignored.}
@article{Kupce2021NRMP,
doi = {10.1038/s43586-021-00024-3},
author = {Kup{\v{c}}e, {\=E}riks and Frydman, Lucio and Webb, Andrew G. and Yong, Jonathan R.\ J. and Claridge, Tim D.\ W.},
title = {Parallel nuclear magnetic resonance spectroscopy},
journaltitle = {Nat.\ Rev.\ Methods Primers},
year = {2021},
volume = {1},
number = {1},
pages = {No. 27},
}
@article{Frydman2002PNASUSA,
doi = {10.1073/pnas.252644399},
author = {Frydman, L. and Scherf, T. and Lupulescu, A.},
journal = {Proc.\ Natl.\ Acad.\ Sci.\ U.\ S.\ A.},
title = {The acquisition of multidimensional NMR spectra within a single scan},
year = {2002},
volume = {99},
issue = {25},
pages = {15858--15862},
}
@article{Frydman2003JACS,
doi = {10.1021/ja030055b},
author = {Frydman, Lucio and Lupulescu, Adonis and Scherf, Tali},
journal = {J.\ Am.\ Chem.\ Soc.},
title = {Principles and Features of Single-Scan Two-Dimensional NMR Spectroscopy},
year = {2003},
volume = {125},
issue = {30},
pages = {9204--9217},
}
@set{ultrafast,
entryset = {Frydman2002PNASUSA, Frydman2003JACS}
}
@COMMENT {Some edge cases.}
@article{Kupce2021NRMP2,
doi = {10.1038/s43586-021-00024-3},
author = {Kup{\v{c}}e, {\=E}riks and Frydman, Lucio and Webb, Andrew G. and Yong, Jonathan R.\ J. and Claridge, Tim D.\ W.},
journaltitle = {Nat.\ Rev.\ Methods Primers},
year = {2021},
volume = {1},
number = {1},
pages = {No. 27},
}
@article
{
Kupce2021NRMP3
,
doi = {10.1038/s43586-021-00024-3},
author = {Kup{\v{c}}e, {\=E}riks and Frydman, Lucio and Webb, Andrew G. and Yong, Jonathan R.\ J. and Claridge, Tim D.\ W.},
title = {Parallel nuclear magnetic resonance spectroscopy},
journaltitle = {Nat.\ Rev.\ Methods Primers},
year = {2021},
volume = {1},
number = {1},
pages = {No. 27}}
@article{Kupce2021NRMP4,
doi = {10.1038/s43586-021-00024-3},
author = {Kup{\v{c}}e, {\=E}riks and Frydman, Lucio and Webb, Andrew G. and Yong, Jonathan R.\ J. and Claridge, Tim D.\ W.},
title = {Parallel nuclear magnetic resonance spectroscopy},
journaltitle = {Nat.\ Rev.\ Methods Primers},
year = {2021},
volume = {1},
number = {1},
pages = {No. 27},
}
@article{Kupce2021NRMP5,
doi = {10.1038/s43586-021-00024-3},
author = {Kup{\v{c}}e, {\=E}riks
and Frydman, Lucio
and Webb, Andrew G.
and Yong, Jonathan R.\ J.
and Claridge, Tim D.\ W.},
title = {Parallel nuclear magnetic resonance spectroscopy},
journaltitle = {Nat.\ Rev.\ Methods Primers},
year = {2021},
volume = {1},
number = {1},
pages = {No. 27},
}
@string{ NMR =
"nuclear magnetic resonance" }
@article{Kupce2021NRMP6,
doi = {10.1038/s43586-021-00024-3},
author = {Kup{\v{c}}e, {\=E}riks and Frydman, Lucio and Webb, Andrew G. and Yong, Jonathan R.\ J. and Claridge, Tim D.\ W.},
title = {Parallel nuclear magnetic resonance spectroscopy},
journaltitle = {Nat.\ Rev.\ Methods Primers},
year = {2021},
volume = {1},
number = {1},
pages = {No. 27},
}

View File

@ -0,0 +1,75 @@
set nocompatible
let &rtp = '../..,' . &rtp
filetype plugin on
set fillchars=fold:\
set number
set foldcolumn=4
nnoremap q :qall!<cr>
call vimtex#log#set_silent()
let g:vimtex_fold_bib_enabled = 1
silent edit test.bib
silent normal zM
if empty($INMAKE) | finish | endif
" Test foldexpr -- 'normal' cases
call assert_equal(-1, foldclosed(1))
call assert_equal(2, foldclosed(2))
call assert_equal(2, foldclosed(5))
call assert_equal(2, foldclosed(9))
call assert_equal(9, foldclosedend(2))
call assert_equal(9, foldclosedend(5))
call assert_equal(9, foldclosedend(9))
call assert_equal(-1, foldclosed(10))
call assert_equal(-1, foldclosed(11))
call assert_equal(-1, foldclosed(12))
" Test foldexpr -- edge cases
call assert_equal(62, foldclosed(62))
call assert_equal(73, foldclosedend(62))
call assert_equal(76, foldclosed(77))
call assert_equal(87, foldclosedend(77))
call assert_equal(90, foldclosed(91))
call assert_equal(103, foldclosedend(91))
call assert_equal(106, foldclosed(106))
call assert_equal(107, foldclosedend(106))
call assert_equal(110, foldclosed(111))
call assert_equal(119, foldclosedend(111))
" Test foldexpr -- whitespace outside entry
call assert_equal(-1, foldclosed(60))
call assert_equal(-1, foldclosed(61))
call assert_equal(-1, foldclosed(74))
call assert_equal(-1, foldclosed(75))
call assert_equal(-1, foldclosed(88))
call assert_equal(-1, foldclosed(89))
call assert_equal(-1, foldclosed(104))
call assert_equal(-1, foldclosed(105))
" Test foldtext
call assert_equal(28, b:vimtex_fold_bib_maxwidth)
call assert_equal('@book{Ernst1987} Principles of Nuclear Magnetic Resonance in One and Two Dimensions', foldtextresult(2))
call assert_equal('@article{Kupce2021NRMP} Parallel nuclear magnetic resonance spectroscopy', foldtextresult(13))
call assert_equal('@set{ultrafast} Frydman2002PNASUSA, Frydman2003JACS', foldtextresult(44))
call assert_equal('@article{Kupce2021NRMP2} ', foldtextresult(51))
call assert_equal('@article{Kupce2021NRMP3} Parallel nuclear magnetic resonance spectroscopy', foldtextresult(62))
call assert_equal('@article{Kupce2021NRMP4} Parallel nuclear magnetic resonance spectroscopy', foldtextresult(76))
call assert_equal('@article{Kupce2021NRMP5} Parallel nuclear magnetic resonance spectroscopy', foldtextresult(90))
call assert_equal('+-- 2 lines: @string{ NMR = ', foldtextresult(106))
call assert_equal('@article{Kupce2021NRMP6} Parallel nuclear magnetic resonance spectroscopy', foldtextresult(110))
" Test foldtext with manual g:vimtex_fold_bib_max_key_width
let g:vimtex_fold_bib_max_key_width = 20
silent VimtexReload
call assert_equal('@book{Ernst1987} Principles of Nuclear Magnetic Resonance in One and Two Dimensions', foldtextresult(2))
call assert_equal('@article{Kupce2021NR Parallel nuclear magnetic resonance spectroscopy', foldtextresult(13))
call assert_equal('@set{ultrafast} Frydman2002PNASUSA, Frydman2003JACS', foldtextresult(44))
call assert_equal('@article{Kupce2021NR ', foldtextresult(51))
call vimtex#test#finished()