I don't agree with this. Perhaps it's possible for someone with exceptional LaTeX and vim knowledge, but even after using both for 20 years I wouldn't do this. The point of the lecture is to assimilate structure and basic understanding, not to produce a neat set of notes instantly. To take notes to this detail means you're putting more time into the note taking than the work. Use a pen and paper. Write down structure…
It is scientifically proven that handwriting is better for your memory because it forces you to process the material more than note taking on a laptop. https://www.google.com/url?q=https://linguistics.ucla.edu/pe...
In the study, there was no measured difference in memory between the two note taking styles; the groups' factual scores were not significantly different in any of the tests.
Where things vary is the non-memory questions: are the notes helping you understand and apply the material better, and how advantageous are they to your studying?
In both of those categories, handwritten notes win out.
Finally, there is no "because"; the authors can only speculate. I am not aware of any studies that can actually purport to say why handwritten notes are better.