modifyOtherKeys ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

modifyOtherKeys ?

mckel...@gmail.com
Hi,

Thx always for everything vim.
With the other vim I can map almost any key with modifiers, but with vim I cannot.
For example to map Alt-y I want to:
nmap <A-y> ...
but this never works. Instead I use up a function key so I dont have a slow <Esc> issue.
Is there a way to set modifyOtherKeys in vim for this ?  Is there a build option for it ??

thx,
-m

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/49309f95-f5f7-4024-9b42-58e4ed94dfebn%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: modifyOtherKeys ?

mckel...@gmail.com
Hi,

ok, well RTFM as they say ...

:h modifyOtherKeys shows me -

For xterm modifyOtherKeys is enabled in the builtin termcap entry.  If this is
  not used you can enable modifyOtherKeys with these lines in your vimrc:
        let &t_TI = "\<Esc>[>4;2m"
        let &t_TE = "\<Esc>[>4;m"

I'm excited to try it out.

thx for all things vim,
-m

On Monday, April 5, 2021 at 4:33:41 PM UTC-4 [hidden email] wrote:
Hi,

Thx always for everything vim.
With the other vim I can map almost any key with modifiers, but with vim I cannot.
For example to map Alt-y I want to:
nmap <A-y> ...
but this never works. Instead I use up a function key so I dont have a slow <Esc> issue.
Is there a way to set modifyOtherKeys in vim for this ?  Is there a build option for it ??

thx,
-m

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/54d993ad-771d-4b55-9b92-caa9688e9a0bn%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: modifyOtherKeys ?

mckel...@gmail.com
Hi,

This setting for me still does not allow a:

nmap <A-y> ...

to work as I think it is supposed to in vim.
Anyone have any suggestions ?
If this is expected behavior then fine, just wondering if anyone knows its expected.

thx,
-m

On Monday, April 5, 2021 at 11:44:46 PM UTC-4 [hidden email] wrote:
Hi,

ok, well RTFM as they say ...

:h modifyOtherKeys shows me -

For xterm modifyOtherKeys is enabled in the builtin termcap entry.  If this is
  not used you can enable modifyOtherKeys with these lines in your vimrc:
        let &t_TI = "\<Esc>[>4;2m"
        let &t_TE = "\<Esc>[>4;m"

I'm excited to try it out.

thx for all things vim,
-m

On Monday, April 5, 2021 at 4:33:41 PM UTC-4 [hidden email] wrote:
Hi,

Thx always for everything vim.
With the other vim I can map almost any key with modifiers, but with vim I cannot.
For example to map Alt-y I want to:
nmap <A-y> ...
but this never works. Instead I use up a function key so I dont have a slow <Esc> issue.
Is there a way to set modifyOtherKeys in vim for this ?  Is there a build option for it ??

thx,
-m

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/3623ce5d-1005-4fb9-888a-749ec9d9edfen%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: modifyOtherKeys ?

Christian Brabandt



On Di, 06 Apr 2021, [hidden email] wrote:
> Hi,
>
> This setting for me still does not allow a:
>
> nmap <A-y> ...
>
> to work as I think it is supposed to in vim.
> Anyone have any suggestions ?

What exactly do you expect? What does :nmap <a-y> output?
Is this with or without modifyOtherKeys? Did you try it in an xterm or
in the GUI (gvim)?


Best,
Christian
--
Man soll nicht nur des Leibes wegen, sich an die Seit' des Weibes legen.

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20210406181227.GA174077%40256bit.org.
Reply | Threaded
Open this post in threaded view
|

Re: modifyOtherKeys ?

mckel...@gmail.com
Christian, hi

If I use neovim the mapping works as expected.
With vim it does not.  Same terminal and settings.
I am using a terminal that has modifyOtherKeys set to 2.
I have made sure t_TI and t_TE are set to the above as described in the help.
I have also checked with some other programs that show the key pressed as 'M-y'

Does a simple nmap like <A-y> k (or <M-y>) work for you in vim ?
The mapping does not complain or report any issue, it just does not work.
If I use nmap <Esc>y k it works.
I am sure many would say go away and just use <Esc>y or set <F22> = "\ey" and nmap <F22> <A-y>.
Its all ok - I just thought vim would support the <A-y> or <M-y> mapping as I've configured it.
Perhaps its some other setting that vim requires that I need to keep researching ?

thx,
-m

On Tuesday, April 6, 2021 at 2:12:34 PM UTC-4 [hidden email] wrote:



On Di, 06 Apr 2021, [hidden email] wrote:
> Hi,
>
> This setting for me still does not allow a:
>
> nmap <A-y> ...
>
> to work as I think it is supposed to in vim.
> Anyone have any suggestions ?

What exactly do you expect? What does :nmap <a-y> output?
Is this with or without modifyOtherKeys? Did you try it in an xterm or
in the GUI (gvim)?


Best,
Christian
--
Man soll nicht nur des Leibes wegen, sich an die Seit' des Weibes legen.

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/b08b1abd-d315-4a2f-bec7-f483fe00b052n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: modifyOtherKeys ?

mckel...@gmail.com
Hi,

A few more answers -
I used terminal vim (not gvim).
I actually tried a few different terminals, but all were the same.
I will keep researching.
gvim does work ok, so its just the terminal vim that I'm asking about.

thx,
-m

On Tuesday, April 6, 2021 at 9:13:22 PM UTC-4 [hidden email] wrote:
Christian, hi

If I use neovim the mapping works as expected.
With vim it does not.  Same terminal and settings.
I am using a terminal that has modifyOtherKeys set to 2.
I have made sure t_TI and t_TE are set to the above as described in the help.
I have also checked with some other programs that show the key pressed as 'M-y'

Does a simple nmap like <A-y> k (or <M-y>) work for you in vim ?
The mapping does not complain or report any issue, it just does not work.
If I use nmap <Esc>y k it works.
I am sure many would say go away and just use <Esc>y or set <F22> = "\ey" and nmap <F22> <A-y>.
Its all ok - I just thought vim would support the <A-y> or <M-y> mapping as I've configured it.
Perhaps its some other setting that vim requires that I need to keep researching ?

thx,
-m

On Tuesday, April 6, 2021 at 2:12:34 PM UTC-4 [hidden email] wrote:



On Di, 06 Apr 2021, [hidden email] wrote:
> Hi,
>
> This setting for me still does not allow a:
>
> nmap <A-y> ...
>
> to work as I think it is supposed to in vim.
> Anyone have any suggestions ?

What exactly do you expect? What does :nmap <a-y> output?
Is this with or without modifyOtherKeys? Did you try it in an xterm or
in the GUI (gvim)?


Best,
Christian
--
Man soll nicht nur des Leibes wegen, sich an die Seit' des Weibes legen.

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/6baefd8d-1178-4713-aa82-16d414f719cen%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: modifyOtherKeys ?

Bram Moolenaar
In reply to this post by mckel...@gmail.com

> If I use neovim the mapping works as expected.
> With vim it does not.  Same terminal and settings.
> I am using a terminal that has modifyOtherKeys set to 2.
> I have made sure t_TI and t_TE are set to the above as described in the
> help.
> I have also checked with some other programs that show the key pressed as
> 'M-y'
>
> Does a simple nmap like <A-y> k (or <M-y>) work for you in vim ?
> The mapping does not complain or report any issue, it just does not work.
> If I use nmap <Esc>y k it works.
> I am sure many would say go away and just use <Esc>y or set <F22> = "\ey"
> and nmap <F22> <A-y>.
> Its all ok - I just thought vim would support the <A-y> or <M-y> mapping as
> I've configured it.
> Perhaps its some other setting that vim requires that I need to keep
> researching ?

This sounds like you have "meta sends escape" enabled, which can cause
various problems.  So first thing is to disable that.

Also see https://github.com/vim/vim/issues/5200

--
hundred-and-one symptoms of being an internet addict:
82. AT&T names you Customer of the Month for the third consecutive time.

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/202104071701.137H1FjS3650044%40masaka.moolenaar.net.
Reply | Threaded
Open this post in threaded view
|

Re: modifyOtherKeys ?

mckel...@gmail.com
Hi,

Thanks for the info Bram.
I changed my terminal to send CSI sequence [27;3;121~ for M-y and a vim mapping for <M-y> now works :-)
It was related to altSendsEsc logic about what the terminal should send for these keys.

thx again for all things vim,
-m

On Wednesday, April 7, 2021 at 1:01:30 PM UTC-4 Bram Moolenaar wrote:

> If I use neovim the mapping works as expected.
> With vim it does not. Same terminal and settings.
> I am using a terminal that has modifyOtherKeys set to 2.
> I have made sure t_TI and t_TE are set to the above as described in the
> help.
> I have also checked with some other programs that show the key pressed as
> 'M-y'
>
> Does a simple nmap like <A-y> k (or <M-y>) work for you in vim ?
> The mapping does not complain or report any issue, it just does not work.
> If I use nmap <Esc>y k it works.
> I am sure many would say go away and just use <Esc>y or set <F22> = "\ey"
> and nmap <F22> <A-y>.
> Its all ok - I just thought vim would support the <A-y> or <M-y> mapping as
> I've configured it.
> Perhaps its some other setting that vim requires that I need to keep
> researching ?

This sounds like you have "meta sends escape" enabled, which can cause
various problems. So first thing is to disable that.

Also see https://github.com/vim/vim/issues/5200

--
hundred-and-one symptoms of being an internet addict:
82. AT&T names you Customer of the Month for the third consecutive time.

/// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/ec905c44-6c69-44c4-8b27-e0d876d0c377n%40googlegroups.com.