Monday, September 22, 2014

How to force Vim to reconcider abbreviations?

I am extensively use mappings and abbreviations.

I have a lot of them and sometimes I type them
not quick enough for Vim to expand them. In this
case I should delete just typed abbreviation that
was not expanded as desired and retype it again.

Unfortunately, if I delete just typed abbreviation
just with backspace and retype it again (that is,
without exiting the input mode), Vim usually does
not expand it no matter how quick I retype it the
second time. :(

To fix that, I have to escape to the command mode
and re-enter the input mode. Then retype the
abbreviation once again.

Sometimes, Vim does not expand my abbreviation even
if I type it quite quick at the beginning. (I will
not insist on this fact but as far as I remember,
there were such cases.)

So, it would be nice to have a short key mapping,
for example with <F4>, that would force Vim to
reconsider just typed abbreviation and expand it
even it was typed in the last session.

Does anybody know how to do it?

I would like to put this mapping into
~./vim/ftplugin/ext.vim
that is where all my abbreviations defined.

Sorry, if this is already described in the documentation.

P.S. And I do not want to prolong the time during which
Vim evaluates *all* my abbreviations as it would
make it too slow.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: