ZyX wrote:
> Reply to message «Re: [BUG] Having <C-o>c inside a insert mode mapping
> consumes
> escape»,
> sent 17:33:08 23 October 2010, Saturday
> by Bram Moolenaar:
>
> > The CTRL-O starts another level of Insert mode, thus the Escape takes
> > you out of the CTRL-O one and you are still in Insert mode.
> Then here is another bug:
> vim -u NONE -c 'set nocompatible' \
> -c 'inoremap $ <C-o>ch<C-o>ch-' \
> -c 'execute "normal a$\ea\ea"' \
> -c 'wq! result.txt'
> should write «-aa», but it writes «-a». What for can such limited
> nesting modes be used?
Nesting is indeed limited to one CTRL-O. Using CTRL-O while already in
Insert mode because of a CTRL-O doesn't make sense thus it's not
supported. Mainly because users would get confused because of all the
nested modes. Hitting Esc and not getting back to Normal mode already
is confusing if you didn't remember exactly what you were doing.
> > Did you intend to do:
> > -c 'inoremap $ <C-o>ch-<Esc>' \
> No, since <ESC> moves me one character left. I wanted to delete one
> previous character that may or may not have some diacritics on it so
> that it will not suffer from 'delcombine' and 'backspace' options (and
> will move the cursor exactly one character left). After discovering
> such `<C-o>ch' (it was actually `<C-\><C-o>ch') behavior I switched to
> `<Esc>cl'.
I suggest you assume Vim does not have bugs and make it work like that.
When you can't make it work we need to reconsider.
--
DEAD PERSON: I'm getting better!
CUSTOMER: No, you're not -- you'll be stone dead in a moment.
MORTICIAN: Oh, I can't take him like that -- it's against regulations.
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
You received this message from the "vim_dev" 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