On Wednesday, June 20, 2012 1:27:22 AM UTC-5, Christian Brabandt wrote:
> On Mon, June 18, 2012 20:48, Bram Moolenaar wrote:
> >
> > Philip Mat (?) wrote:
> >
> >> In Vim 7.3 mswin.vim defines `inoremap <C-S> <C-O>:update<CR>`, which
> >> causes problems when pressed shortly after a <C-X><C-O> combination
> >> because the auto-completed text will now read :update + newline
> >> instead of saving the file. The problem is caused by the <C-O> which
> >> undoes the autocomplete item instead of the typical <C-O> behavior.
> >>
> >> How to reproduce:
> >>
> >> 1. In an XML file type <Tag></
> >> 2. Type <C-X><C-O> => the content now reads <Tag></Tag>
> >> 3. Within a short amount of time, type <C-S> => the content now reads
> >> <Tag></:update
> >>
> >> (4. if you undo, it undoes the whole line)
> >>
> >> I think that maybe a better map would be `inoremap <C-S>
> >> <Esc>:update<CR>a`?
> >>
> >> Is this a bug and if so, where do I file a bug report?
> >
> > You just did.
> >
> > I wonder if leaving Insert mode and then entering again causes different
> > problems?
>
> How about switching from using <c-o> in insert mode to using <c-\><c-o>
> which shouldn't be ambigious when used in insert mode completion and avoids
> moving the cursor.
>
> Philip,
> can you test, whether this works better:
> :inoremap <c-s> <c-\><c-o>:update<cr>
>
> regards,
> Christian
Yes, this works! Thank you, Christian.
--
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
Wednesday, June 20, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment