0

I've been struggling with writing fast in Latex for quite a long time. Although my typing speed is not too horrible, it still takes me a long time to write complicated formulae on Overleaf, for example. In very specialized situations, defining newcommands help a little.

I recently came across vim, and from what I read on the internet, people are able to take live notes using vim, by defining helpful keybindings.

Is this the same as defining newcommands in latex documents? It will take me some time to get comfortable with vim (I have almost no programming experience, for instance). Should I put in the effort of learning vim, in the hope that one day I will be able to take live notes?

  • Please do not overdo it with the \newcommands. If you ever share your file with a collaborator and everybody has their own macros, the hell breaks loose, Use key board short cuts and standard commands. (You can find answers here which are IMHO rather questionable practice, such as, say, \newcommand{\ul}{...} even though \ul is a command in the soul package, which is a sort of standard package. So I recommend avoiding those things as much as possible.) –  Apr 30 '20 at 22:15
  • A good vim setup (plugins, snippets, autocompletion, etc.) is far better than mangling your latex code. A good starting point would be here: https://castel.dev/post/lecture-notes-1/ – DG' Apr 30 '20 at 23:51
  • 1
    Vim is a great editor, but it has nothing to do with LaTeX or programming. That's a bit like asking which colored pens are faster to write with. But be sure ti get the cup -> https://www.lehmanns.de/shop/mathematik-informatik/5635112-9783865410474-vi-referenz-tasse – Johannes_B May 01 '20 at 04:44

1 Answers1

4

To me, \newcommand and editor keybindings have nearly completely different use-cases.

I would define a \newcommand because it improves the semantics of my document, or gives me flexibility to change design in the future. Never (or at least nearly never) to save typing.

I certainly will, however, use my editor to save me typing. A well-constructed LaTeX editor, or plugin to an editor like Vim, will mostly have already defined many that are useful. I don't think this is some special Vim-magic: there are good LaTeX modes or plug-ins for lots of editors. See this question for a big list (That's not a dig at Vim, just doubting that there is anything inherently faster, in the hands of an experienced user, about it, compared to other good editors. And speed in Vim does critically depend on taking the time to learn how to use it.)

When you start out with LaTeX, however, often your speed is not dependent on how quickly you can type, but on how quickly you can think what you need to do to achieve something. Especially when the typesetting gets complicated (and accuracy matters), as it does with formulae. If you add the mental load of learning a new and idiosyncratic editor and a raft of keybindings (so now you have to remember both the command you want and the keybinding you want) you may end up going slower, at least in the short term.

(FWIW, I don't think LaTeX is well designed for taking speedy live notes, even if some people manage to do that. That's not its main aim. But I'm pretty confident that those who are speedy are speedy because they have spent lots of time doing it. There's no magic bullet.)

Paul Stanley
  • 18,151