Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

let R_assign_map = '<M-->' does not work to me #634

Closed
iago-pssjd opened this issue Nov 18, 2021 · 8 comments
Closed

let R_assign_map = '<M-->' does not work to me #634

iago-pssjd opened this issue Nov 18, 2021 · 8 comments

Comments

@iago-pssjd
Copy link

Following the documentation, I have added

set <M-->=^[-
let R_assign_map = '<M-->'

to ~/.vimrc in order to use Alt-- to insert <- but it is not working (it just avoids replacing _ by <-). It places the cursor at the beginning of one line up. I looked for

:verbose map ^[-

to see if it was used for another plugin, but I get No mapping found. Which can be the issue?

Thanks!

@jalvesaq
Copy link
Owner

A can replicate the issue. If I do the trick taught at stackexchange (answer 69), I find - as the final string of <M-->. However, without, any trick, that is, without using the sed -n l command, if I hold the left Alt key and press = in Insert mode, I get ½. So, I put in my init.vim:

let R_assign_map = '½'

and now I can press Alt= to get " <- ". I was still using the default underscore as R_assign_map, but I liked so much the <M-=> that now I switched to it.

Maybe someone else can find a way of mapping <M-->...

Thanks for reporting the issue!

@mschilli87
Copy link
Contributor

@jalvesaq:

... if I hold the left Alt key and press = in Insert mode, I get ½.

If I do the same, I am taken to normal mode (neovim 0.4.4, us layout).

@jalvesaq
Copy link
Owner

My keyboard has the Brazilian layout. The keys are mostly in the same position as in the U.S. keyboard, but it seems that we have more variation in the output of Alt keys.

@jalvesaq
Copy link
Owner

jalvesaq commented Nov 1, 2022

I'm closing the issue because the problem is fixed in Neovim: let R_assign_map = '<M-->' works as expected.
I don't know when it was fixed... I'm using Neovim v0.9.0-dev.

@jalvesaq jalvesaq closed this as completed Nov 1, 2022
@iago-pssjd
Copy link
Author

iago-pssjd commented Nov 2, 2022

Not working yet with ViM 8.2 on Debian stable (https://packages.debian.org/bullseye/source/vim) :(

@jalvesaq
Copy link
Owner

jalvesaq commented Nov 2, 2022

It does not work with Vim, only with GVim and Neovim. But it is a limitation of Vim, not Nvim-R.

@iago-pssjd
Copy link
Author

Do you mean this will not work even with future versions of ViM?

@jalvesaq
Copy link
Owner

jalvesaq commented Nov 3, 2022

I don't know because I'm not part of Vim's development team, but similar issues have already been reported:
https://github.com/vim/vim/issues?q=is%3Aissue+is%3Aopen+map+alt+key+

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

No branches or pull requests

3 participants