[Tex/LaTex] Speedy LaTeXing


I am LaTeXing my notes for a maths class, and I'm wondering what TeX.SE has to say about tips and tricks that have helped them enter their LaTeX code that much faster. It can be anything from a program to a macro to a seated position / music choice.

Best Answer

Assuming you are in a Mac.

I don't know vim (which is one of the most used editors), but I will talk about TextMate. In my case, I can't imagine how could vim be better than TextMate for me (I don't know nothing about programming).

In TM (TextMate), apart from normal input, you have four different kinds of 'entry options'

  • Typical snippets. You type some text (i.e. mat) press tab and then you get what the snippet has in (in this case the full matrix environment and an option to choose between pmatrix, vmatrix, etc.). Apart from the text you have options like where the cursor goes and more, but this is basic.
  • LaTeX symbol based con current word. You type a letter or two letter (i.e. a) you press the key combination and you get some symbol previously assigned (in this case \alpha).
  • Environment based on current word. You type what you want to be in \begin{X} ... \end{X} (i.e. type environmentwhichidefined press the key combination and then you get the full \begin{environmentwhichidefined} \end{environmentwhichidefined} with the cursor in the middle).
  • Command based on current word. You type a word or a letter and after pressing the key combination you get a 'command' (i.e. you write s press the keys and get \sum_{$1}^{$2} $0, where $i is the places where the cursor goes when you hit tab: if you type s key combination a tab b tab x you will get \sum_{a}^{b} x).

With those commands is pretty easy to be really fast. All the key combinations are configurable, of course. You can create new of any of this different input shortcuts very easy.

In addition, you have a lot of preconfigured commands for LaTeX. Apart from this, you have a lot of commands (like insert new \item, next cell in a tabular, new column and new row in a tabular, create tabular from selection, etc.). The only thing you have to do is to stay one afternoon looking through all its options (you will get impressed).

And, of course, it has a system to save and use preambles, full template documents, etc.

The only thing I believe (but I don't know) vim could be better for me is that may be it supports some extra features in the Find/Replace option, which in TM is the standard and doesn't give you so much flexibility. I miss a good find/replacement system in TM which may be vim could give me (with some little programming).

I do take notes of my lessons (math student) with TM. So, I bet for TextMate (since it's free, I hope this is not considered publicity :P).

PS: I spect some vim users to tell why they use vim. Because I've never tried to learn or discover what vim can do. TM just worked. But please tell the good things about vim.