Matt Wozniski wrote:

> On Sat, Feb 14, 2009 at 2:42 AM, Dominique Pelle 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.
>
>> One annoying thing with...
>>
>> imap <Space> <Space><C-G>u
>>
>> ... is that it's not nice when trying to undo after pasting a large piece of
>> text from clipboard (set paste  then middle click to paste), since you
>> can then only undo word by word which can be painful.  It'd be nice to
>> be able to disable it when pasting text (how??).
>
> :set paste  ;-)  - :set paste disables mappings, abbreviations,
> auto-indenting, and many other things.  If this map still fires,
> something is wrong.

Doh, you're right of course.  Yet I initially had
"imap <Space> <Space><C-G>u" in my ~/.vimrc
and I commented it out for some reasons.  I can't
remember why now, but it was probably annoying
when pasting _without_ having done "set paste"
(i.e. with nopaste) prior to pasting text.  So
%subst/paste/nopaste/g in my previous mail and it
should then make more sense :-)

Cutting undo sequences seems more useful when
typing text than when pasting text with the mouse.

-- Dominique

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

Reply via email to