Monday, June 18, 2012

Re: mswin: problem with C-S after C-X,C-O

I've been running for a few days with

inoremap <C-S> <Esc>:update<CR>a

and I didn't run into any issues.

I typically have inoremap <C-S> <Esc>:w<CR> because I'm a compulsive saver and I want to be in normal mode as much as possible.

I can see your point though, but all I can offer is anecdotal evidence.

Thank you very much!

On Monday, June 18, 2012 1:48:39 PM UTC-5, 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?
>
> --
> Nothing is fool-proof to a sufficiently talented fool.
>
> /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
> /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
> \\\ an exciting new programming language -- http://www.Zimbu.org ///
> \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

--
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

No comments: