I am facing a problem for using shortcuts provided by vim-latex. Say, I
want \textbf
, so I was trying `bf
.
But, given, `b
is a shortcut for
\beta
, I always end up with something \betaf
.
FBF works, how can I use `bf
?
any help?
vim
I am facing a problem for using shortcuts provided by vim-latex. Say, I
want \textbf
, so I was trying `bf
.
But, given, `b
is a shortcut for
\beta
, I always end up with something \betaf
.
FBF works, how can I use `bf
?
any help?
Best Answer
The
vim-latex
plugin uses its own implementation of the:imap
command, which here is responsible for detecting patterns that should be replaced.According to the documentation, the timeout functionality of
:imap
, which would have allowed it to wait some time before checking for known patterns and allowing your usage of`bf
was removed invim-latex‘
ownIMAP()
function to allow for slower typing while still recognizing patterns.IMAP()
does not have the ability to wait until you probably finished typing and instead tries to match what it sees right now.Currently, I have no idea as to how one would either add that functionality to
IMAP()
or use its mappings with:imap
.So, simply put, this happens because
`b
gets already replaced before you typef
.Or as the section
3.12 Making your own Macros via IMAP()
of thevim-latex documentation
puts it:Using
IMAP()
you could try looking into~/.vim/ftplugin/latex-suite/main.vim
and adjust the mappings to your convenience with the above explained restrictions. For example make the following changes: line 93b
→bg
and add a definition forbf
. I am not entirely sure, thatbg
is unused by default. And the above would break the consistency of the greek-letter-mappings.