Latex-Suite utilizes a set of macros originally created by Carl Mueller in
auctex.vim to make inserting all the \left ... \right
stuff very easy and to also make some use of the heavily under-utilized
<Alt>
key.
By default, the mappings involving the <Alt>
key
are turned off for compatibility with inserting non-ASCII characters. It
can be enabled by setting
let g:Tex_AdvancedMath = 1
in your $VIM/ftplugin/tex.vim
.
By default, typing Alt-<key>
in Vim takes
focus to the menu bar if a menu with the hotkey
<key>
exists. If in your case, there are
conflicts due to this behavior, you will need to set
set winaltkeys=no
in your $VIM/ftplugin/tex.vim
in order to use these
maps.
If for some reason, you wish to not map the
<Alt>
keys, (some European users need to use
the <Alt>
key to enter diacritics), you can
change these maps to other keys as described in the section Customizing Alt-key maps.
This is a polymorphic insert-mode mapping which expands to one of the following depending on the character just before the cursor location.
Character before cursor | Expansion |
---|---|
( | \left( <++> \right) |
[ | \left[ <++> \right] |
| | \left| <++> \right| |
{ | \left\{ <++> \right\} |
< | \langle <++> \rangle |
q | \lefteqn{<++>}<++> |
If the character before the cursor is none of the above, then it will
simply insert a \label{<++>}<++>
.
In insert mode, this key is polymorphic as follows:
\mathcal{}
.
\cite{}
.
In visual mode, it will simply enclose the selection in
\mathcal{}
This mapping inserts an \item
command at the
current cursor location depending on which environment the cursor is
enclosed in. The style of the \item
command is
dependent on the enclosing environment. By default,
<Alt-I>
has styles defined forthe following
environments:
Environment | Style |
---|---|
itemize | \item |
enumerate | \item |
theindex | \item |
thebibliography | \item[<+biblabel+>]{<+bibkey+>} <++> |
description | \item[<+label+>] <++> |
<Alt-I>
is intelligent enough to
account for nested environments. For example,
\begin{itemize} \item first item \item second item \begin{description} \item[label1] first desc \item[label2] second % <Alt-I> will insert "\item[<+label+>] <++>" if % used here \end{description} \item third item % <Alt-I> will insert "\item " when if used here. \end{itemize} % <Alt-I> will insert nothing ("") if used here
The style used by <Alt-I>
can be customized
using the g:Tex_ItemStyle_environment
variable.