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?
> 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'.
signature.asc
Description: This is a digitally signed message part.
