On 20/10/09 08:29, Israel Chauca F. wrote:
>
> On Oct 19, 10:20 am, Ben Fritz<[email protected]>  wrote:
>> Sorry, but this is an intentional (though confusing) behavior of Vim.
>> See :help ins-special-special for all the commands that act this way.
>
> Thanks for that, I just read it. While I understand about<C-O>, I
> don't get why<Left>  and<Right>  should brake the undo/redo sequence.

Because they interrupt the insertion.

In Vim release 6 (and probably still today in some vimrc scripts), 
before i_CTRL-G_u was introduced, mappings such as the following were 
used to create additional undo points at WORD boundaries in Insert mode:

        :imap <Space>   <Space><Left><Right>
        :imap <Tab>     <Tab><Left><Right>
        :imap <CR>      <CR><Up><Down>

If you want to "kill" an undo point, see ":help :undojoin". I'm not sure 
it will work in this case though. The following is untested:

        :inoremap (     ()<Esc>:undojoin|startinsert<CR>

>
>> You might be able to piece together a workaround by using<C-O>
>> to :let a variable to the current value of the @. register, then
>> completing your move, plus adding to/clearing this variable on
>> InsertLeave/InsertEnter events, and remapping the '.' command, but I'm
>> far from certain it will be worth the trouble.
>
> I was thinking of this after I found the "Repeat" plugin, which does
> something on that line, but as you say, it might me too much and I'm
> not that intimate with Vim to make sure it'll behave well.
>
> Thanks!
> Israel

Best regards,
Tony.
-- 
Ignisecond, n.:
        The overlapping moment of time when the hand is locking the car
door even as the brain is saying, "my keys are in there!"
                -- Rich Hall, "Sniglets"

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

Reply via email to