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.
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 imap
s) and you
can use the movement or backspace key to correct yourself unlike normal
mappings.
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.
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
.
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|
.
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.