Hi,
2019/11/28 Thu 5:59:01 UTC+9 Bram Moolenaar wrote:
>
>
> 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?
I don't know whether this is changed or not, just noticed this behavior by
testing this patch.
> The CTRL-V only takes the next character literally, not any following
ones.
Ah, I got it. That explains the current behavior.
Regards,
Ken Takata
--
--
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/a757a119-313b-42f5-bd9b-0234d83395df%40googlegroups.com.