Ken Takata wrote:
> 2019/11/27 Wed 3:34:01 UTC+9 Bram Moolenaar wrote:
> >
> >
> > Patch 8.1.2350
> > Problem: Other text for CTRL-V in Insert mode with modifyOtherKeys.
> > Solution: Convert the Escape sequence back to key as if modifyOtherKeys
> > is
> > not set, and use CTRL-SHIFT-V to get the Escape sequence
> > itself.
> > (closes #5254)
> > Files: runtime/doc/insert.txt, runtime/doc/cmdline.txt,
> > src/edit.c,
> > src/proto/edit.pro, src/term.c, src/proto/term.pro,
> > src/getchar.c,
> > src/proto/getchar.pro, src/testdir/test_termcodes.vim,
> > src/ex_getln.c
> >
>
> This patch works nicely. However, I have a question.
> It seems that mappings are applied to the Esc sequence inserted by
> CTRL-SHIFT-V.
>
> E.g. consider the following mapping which automatically insert a closing
> bracket
> when an opening bracket is typed:
>
> :inoremap [ []<Left>
>
> Then type CTRL-SHIFT-V CTRL-V in insert mode.
> "^[[118;5u]" is inserted instead of "^[[118;5u". ("]" is automatically
> added.)
>
> Is this intentional? Isn't it better not to apply mappings to CTRL-SHIFT-V?
I believe this hasn't changed: The CTRL-V only takes the next character
literally, not any following ones. Thus only the Esc is used as-is, the
rest is consumed as normal characters. Same happens with a function key
starting with Esc-[.
Do you think this changed?
--
All true wisdom is found on T-shirts.
/// Bram Moolenaar -- [email protected] -- 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_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
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/201911272058.xARKwqu9030194%40masaka.moolenaar.net.