Playing with abbreviation in insert mode i noticed the following unexpected behaviour, when using gvim with vim-latex plugin:
Defining an abbreviation such as
:iab m <m>
or any similar "container" abbreviation such as
:iab m \(m\) :iab m \m\ :iab m [m]
and so on, i get the expected behaviour when simply typing in insert mode
However, if I type
the "container characters" are doubled, for example in the first two cases above I get
I don't find this kind of behaviour in the abbreviations section of the man page, nor in the relative vim.wikia page.
I'm using the vim version 7.4, and I can reproduce this both on Arch Linux and Windows 7.
Why does this happen? Can I prevent it? How?
Developers mailing list
this seems to be a strange interaction with the IMAP-features of the latex-suite.
:iab a (m) :iab m [a]
ais expanded to
(m)and the inner
mis expanded to
If one uses
<space>triggers no expansions, but
I have no clue how to fix this.
Best regards, Gerd
Other unexpected behaviours
Following a suggestion in the comments I tried with
:inoreab n <n>
When I do this something else happens: typing
with a * character coming from nowhere.
I get the expected output
Can you reproduce this?
Without set backspace=eol,indent,start
Even without using recursive abbreviations, there is a problem if
is not used.
Defining an abbreviation like
:iab alice bob
and using it typing
does not substitute
bob. Instead places
bob at the right of
alice, producing an output like
<enter> the substitution is made correctly.