Monday, June 18, 2012

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

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

Post a Comment