On Sep 24, 2009, at 12:25 PM, Andy Wokula wrote:
> Roald de Vries schrieb:
>> Hi all,
>>
>> Is it possible to undo an abbreviation expansion? I have a latex
>> mapping 'ia --> \rightarrow', but somtimes don't want it to expand.
>> How can I do that?
>>
>> Roald
>
> Press <C-V> just before entering the next character (here <Space>):
> --><C-V> more text ...
>
> For undoing, you can experiment, e.g.
>
> :ia --> --><C-G>u<BS><BS><BS>\rightarrow
>
> <Esc>u will then bring back the arrow "-->".
> Just invented right now, not common use AFAIK.
Thanks Andy, the <C-V> trick is very useful. The second abbreviation
too, but I don't want to enter all my abbreviations like this. I would
prefer use an autocommand like
au AbbrExpandPre * <C-G>u
... but I guess that's impossible since there is no event
AbbrExpandPre, and the command should be an ex command, which shows
the problem: AbbrExpandPre couldn't be an autocommand because insert
mode is never left.
Doe anybody have a good (even better) solution to my problem?
Thanks in advance, Roald
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---