3 Latex-Suite Macros

3.1 Environment Mappings
3.2 Command Mappings
3.3 Font Mappings
3.4 Section Mappings
3.5 Greek Letter Mappings
3.6 Auc-Tex Key Bindings
3.7 Diacritics
3.8 BibTeX Shortcuts
3.9 Smart Key Mappings
3.10 Alt Key Macros
3.11 Custom Macros
3.12 Making your own Macros via IMAP()

Latex-Suite ships with a very comprehensive set of insert mode and |visual-mode| mappings and menu items to typeset most of the LaTeX elements.

Note

These mappings are are not standard mappings in the sense that only the last character is mapped. See plugin/imaps.vim for further documentation. For example, in the case of the mapping EFI provided by Latex-Suite you can press the characters 'E', 'F' and 'I' as slowly as you wish (unlike the normal imap command where timeout issues are involved). The characters are visible as you type them (unlike normal imaps) and you can use the movement or backspace key to correct yourself unlike normal mappings.

Place Holders

Almost all macros provided in Latex-Suite implement Stephen Riem's bracketing system and Gergely Kontra's JumpFunc() for handling place-holders. This consists of using "place-holders" to mark off locations where the next relevant editing has to be done. As an example, when you type EFI in |insert-mode|, you will get the following:

\begin{figure}[<+htpb+>]
    \centering
    \includegraphics{<+file+>}
    \caption{<+caption text+>}
    \label{fig:<+label+>}
\end{figure}<++>

The text <+htpb+> will be selected and you will be left in |select-mode| so that you can continue typing straight away. After having typed in the placement specifier, you can press <Ctrl-J> (while still in insert-mode). This will take you directly to the next "place-holder". i.e, <+file+> will be visually selected with Vim in select mode again for typing in the file name. This saves on a lot of key presses.

Over-riding Latex-Suite Macros

If you wish to change these macros from their default values, for example, if you wish to change `w to expand to \omega instead of its default expansion to \wedge, you should use the IMAP function as described in the Using IMAP() section.

An important thing to note is that if you wish to over-ride macros created by Latex-Suite rather than merely create new macros, you should place the IMAP() calls in a script which gets sourced after the files in Latex-Suite. A good place typically is as a file-type plugin file in the ~/.vim/after/ftplugin/ directory. (Use ~/vimfiles if you are using WINDOWS). For example to over-ride `w to \omega instead of \wedge, place the following line in (say) ~/.vim/after/ftplugin/tex_macros.vim:

call IMAP('`w', '\omega', 'tex')

To delete a mapping, you can use

call IUNMAP('FEM', 'tex')

in ~/.vim/after/ftplugin/tex_macros.vim.

Note

It is important to use a file-name which will get sourced on a FileType event. Therefore you must use a file-name which conforms to the standards as described in |ftplugin-name|.

Pausing Macro expansion

If you wish to temporarily suspend the imaps functionality, then you can set the Imap_FreezeImap to 1. If you set g:Imap_FreezeImap to 1, then it will be a system-wide setting. Setting b:Imap_FreezeImap will affect only the current buffer.

The following sections describe the various editing macros provided by Latex-Suite.