Most of the mappings used in Latex-Suite can be mapped to a different key
combination to suit your particular needs. An example best explains the
procedure for doing this. Suppose you want to remap the
<C-j>
key which Latex-Suite (actually imaps.vim) uses
to jump to the next placeholder. To do this, you first need to find out
which <Plug>
mapping
<C-j>
is derived from. You will need to look
at the relevant section of this manual to do this. For example, the
section IMAP mappings has
the information that the <C-j>
key is derived
from <Plug>IMAP_JumpForward
. Therefore to
remap the <C-j>
key to say
<C-space>
, you will need to put a
statement like the following in your ~/.vimrc
.
imap <C-space> <Plug>IMAP_JumpForward
To change the IMAP
mappings which affect jumping
between placeholders, the map
statement above has
to be placed in your ~/.vimrc
. For other mappings
you can place the map
statement in your
$VIM/ftplugin/tex.vim
file. The reason for this is
that the <C-j>
maps are created in
plugin/imaps.vim
, which is sourced as soon as Vim
starts before sourcing any ftplugin files.
These mappings are utilized for jumping between placeholders as described here. See the parent section to find out how to use this information to change the default maps.
Plug map | Default Key |
---|---|
<Plug>IMAP_JumpForward | <C-j> |
<Plug>IMAP_JumpBack | (none) |
<Plug>IMAP_DeleteAndJumpForward | (none) |
<Plug>IMAP_DeleteAndJumpBack | (none) |
<Plug>IMAP_JumpForward
takes you to the
location of the next place-holder.
<Plug>IMAP_JumpBack
takes you to the previous
place-holder.
<Plug>IMAP_DeleteAndJumpForward
deletes the
presently selected place-holder and jumps to the next place-holder
irrespective of whether the present placeholder is empty or not and
ignoring the value of place-holder settings like g:Imap_DeleteEmptyPlaceHolders
and g:Imap_StickyPlaceHolders
<Plug>IMAP_DeleteAndJumpBack
deletes the
presently selected place-holder and jumps to the previous place-holder
irrespective of whether the present placeholder is empty or not and
ignoring the value of place-holder settings like g:Imap_DeleteEmptyPlaceHolders
and g:Imap_StickyPlaceHolders
These mappings are are described in the section Alt key macros. See the parent section to see how to use the following information to remap keys.
Plug Mapping | Default Key |
---|---|
<Plug>Tex_MathBF | <Alt-B> |
<Plug>Tex_MathCal | <Alt-C> |
<Plug>Tex_LeftRight | <Alt-L> |
<Plug>Tex_InsertItemOnThisLine | <Alt-I> |