On 15/02/09 02:16, Matt Wozniski wrote:
> On Sat, Feb 14, 2009 at 7:59 AM, Tony Mechelynck wrote:
>> On 14/02/09 08:57, Matt Wozniski wrote:
>>>> Sean wrote:
>>>>>> You can add an undo step whenever you insert a Space this way:
>>>>>>       :imap<Space>   <Space><C-G>u
>>>>>>
>>>>>> Notes:
>>>>>> :imap (vs. :inoremap) is used to still be able to expand abbreviations.
>>>>>> There is no endless loop, see
>>>>>>       :h recursive_mapping
>>> I wouldn't have thought that would affect abbrs... good to know.
>> It doesn't.
>
> Yes it does.
>
> $ gvim -u NONE -N -c "iabbr a b" -c $'imap<space>  <space>\au'
>
> Typing "a<space>" in insert mode puts a "b" in the buffer.
>
> $ gvim -u NONE -N -c "iabbr a b" -c $'inoremap<space>  <space>\au'
>
> Typing "a<space>" in insert mode puts an "a" in the buffer; the imap
> fired but not the iabbr.
>
>> ":noremap" and friends prohibit remapping the _right_ hand
>> side of the mapping they define. They have no influence whatsoever on
>> whether or not the _left_ hand side of that same mapping will be
>> expanded if found in the expansion of another mapping or abbreviation.
>
> Right, but the abbreviation of the expansion is caused by the space
> that is inserted on the RHS.  When remapping is disabled, that space
> doesn't cause the abbr to be expanded.  It seems that<C-]>  also
> doesn't cause the abbr to be expanded...
>
> ~Matt

If typing

        a<C-]>

doesn't cause

        iabbr a b

to be expanded _because_ there exists a

        inoremap  <Space>  <Space><C-G>u

then there's something seriously wrong somewhere, since you never typed 
the space which would have triggered the mapping anyway. I can't see how 
the presence or absence of a mapping which isn't triggered could make 
any difference at all.


Best regards,
Tony.
-- 
While most peoples' opinions change, the conviction of their
correctness never does.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to