Movement and actions using )
and (
are very powerful: I use them all the time. However, when writing and editing LaTeX, I have run into the following problem: vim cannot recognize the end of some LaTeX sentences. For example:
This is a test. This is only a test. Instead, according to Gottlieb, Socrates
has two audiences, the in-crowd and the outsiders.\footcite[][278]{gottlieb-1992}
The in-crowd know what Socrates means, but Socrates deceives the outsiders. I am
still testing. Test?\footcite[Blah, blah][456]{gottlieb-1992} Moar testing.
Can you see it? The end of the first sentence is, well, kind of at outsiders.
,
which is right before \footcite
. But really the sentence ends after the citation {gottlieb-1992}
. Either way, it's a moot point: vim thinks that the third and fourth sentences are one sentence. The same goes for the last two sentences: vim sees them as one sentence. The problem, I think, is that the end of sentence (.
or ?
) is hidden by \footcite
.
tl;dr: sentence endings in LaTeX can involve citations after the final punctuation. As a result, vanilla {neo,}vim cannot handle them. Does anyone know of a trick or a plugin to help vim deal with them?
:help sentence
; what if you put the\footcite{...}
command before the closing.
? It won't help if your footnote contains a full sentence, but... I believe there is also a way to separate the\footcite
from the actual text of the footnote? – D. Ben Knoble♦ Mar 21 '20 at 17:43