The usecase is LaTeX, which I write using VimTeX.
To make double quoted words
one would write ``words''
.
However, I'm much more used, from many other contexts (both prose and code), to type " for both opening and closing double quotes, and I often forget I have to press `` and ''.
So I'd like a way to change "
to ``
or ''
depending on whether it's preceded by a space (or tab) or not.
So far I've come up with the solution I propose in the self answer, but I'd like to know whether there's something better.