这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@Konfekt
Copy link

@Konfekt Konfekt commented Mar 5, 2024

On Urxvt 9.31 the mappings <m-[/]> did not work, but to my surprise finally when I defined them in vimrc.

Finding these removed lines took too much time;
have mercy on the user and behave expectedly.

On urxvt 9.31 <m-[/]> did not work but to my surprise finally when I defined them in vimrc.
Finding these removed lines  took too much time;
have mercy on the user and behave expectedly
@Konfekt
Copy link
Author

Konfekt commented Mar 5, 2024

Of course, to fix this particular issue a check such as

if $TERM =~? '^rxvt-unicode' || &term =~? '^rxvt-unicode'

would be sufficient, but maybe this is not the only manifestation of incompatibilities arising from changing the encoding.

@tpope
Copy link
Collaborator

tpope commented Mar 5, 2024

The issue is that Vim (not Neovim) overlaps meta maps with valid UTF-8 characters:

:echo "\<M-[>"
Û
:echo "\<M-]>"
Ý

If you map these the UTF-8 encoding, then it becomes impossible to type Û and Ý. Temporarily changing the encoding works around this, but the resulting maps don't work in every terminal.

Copilot.vim will always error on the side of not breaking the user's ability to type. If you're happy with the trade-off, then mapping in your vimrc is the solution.

@tpope tpope closed this Mar 5, 2024
@Konfekt
Copy link
Author

Konfekt commented Mar 5, 2024

I am happy without Û and Ý for coding, but I was unhappy while trying to make these mappings work, assuming that the mappings set by this plugin are the same as that in vimrc.
Since this is nowhere documented, how is a user supposed to know this?

@tpope
Copy link
Collaborator

tpope commented Mar 5, 2024

It's covered under a generic caveat found in the help file:

Note that M- (a.k.a. meta or alt) maps are highly dependent on your terminal
to function correctly and may be unsupported with your setup.

I'll see if I can make that a bit clearer.

@Konfekt
Copy link
Author

Konfekt commented Mar 5, 2024

Note that M- (a.k.a. meta or alt) maps are highly dependent on your terminal
to function correctly and may be unsupported with your setup.

This was expected. What was unexpected was that the plug-in changes &encoding for these mappings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants