How to map Alt-3?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to map Alt-3?

Bruce Who
Hi,

        How to map <Alt-3> to something? For example:

    set winaltkeys=no
    imap <Alt-3> dosomethinghere

    and this one doesn't work too:

    imap <Ctrl-3> dosomethinghere

    Could anyone figure me out?

Best regards,

????????????????Bruce Who
????????????????????2005-06-03
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to map Alt-3?

panshizhu

As far as I know, the Alt-4, Alt-5 and Ctrl-4, Ctrl-5 doesn't work too...
So I see no reason Ctrl-3 and Alt-3 must work.

Anyway, I don't use chords very often since they are difficult to remember
and difficult to press. The <Leader> mapping is far more convient for me...

--
Sincerely
Pan, Shizhu. ext: 2221




"Bruce Who" <[hidden email]> wrote on 2005-06-03 09:31:21:

> Hi,
>
>    How to map <Alt-3> to something? For example:
>
>     set winaltkeys=no
>     imap <Alt-3> dosomethinghere
>
>     and this one doesn't work too:
>
>     imap <Ctrl-3> dosomethinghere
>
>     Could anyone figure me out?
>
> Best regards,
>
>         Bruce Who
>           2005-06-03
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to map Alt-3?

A.J.Mechelynck
In reply to this post by Bruce Who
Bruce Who wrote:

> Hi,
>
> How to map <Alt-3> to something? For example:
>
>     set winaltkeys=no
>     imap <Alt-3> dosomethinghere
>
>     and this one doesn't work too:
>
>     imap <Ctrl-3> dosomethinghere
>
>     Could anyone figure me out?
>
> Best regards,
>
> ????????????????????????Bruce Who
> ??????????????????????????????2005-06-03
>
>
>

These may or may not work depending on your OS. In mappings, Alt-3 (when
recognised) is <M-3> or <A-3> while Ctrl-3 is <C-3> ; but on some
systems, one or both of them is simply not seen by gvim. IIRC, I could
make <M-3> work on Windows but not on Unix; however, even on Windows,
Alt-0 to Alt-9 clashed with some accented letters so they weren't
practical. Anyway, YMMV.

See also my reply to Mike McNally < m5 -at- works.com >

Best regards,
Tony.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to map Alt-3?

Bruce Who
In reply to this post by Bruce Who
Hi, Tony:

======= 2005-06-03 10:26:52 A. J. Mechelynck wrote: =======

>Bruce Who wrote:
>> Hi,
>>
>> How to map <Alt-3> to something? For example:
>>
>>     set winaltkeys=no
>>     imap <Alt-3> dosomethinghere
>>
>>     and this one doesn't work too:
>>
>>     imap <Ctrl-3> dosomethinghere
>>
>>     Could anyone figure me out?
>>
>> Best regards,
>>
>> ????????????????Bruce Who
>> ????????????????????2005-06-03
>>
>>
>>
>
>These may or may not work depending on your OS. In mappings, Alt-3 (when
>recognised) is <M-3> or <A-3> while Ctrl-3 is <C-3> ; but on some
>systems, one or both of them is simply not seen by gvim. IIRC, I could
>make <M-3> work on Windows but not on Unix; however, even on Windows,
>Alt-0 to Alt-9 clashed with some accented letters so they weren't
>practical. Anyway, YMMV.

    So, we could not use the combination of number and other keys as a map? Am I right?

>See also my reply to Mike McNally < m5 -at- works.com >
>
>Best regards,
>Tony.
>

= = = = = = = = = = = = = = = = = = = =
                       
Best regards,

????????????????Bruce Who
????????????????????2005-06-03

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to map Alt-3?

A.J.Mechelynck
Bruce Who wrote:

> Hi, Tony:
>
> ======= 2005-06-03 10:26:52 A. J. Mechelynck wrote: =======
>
>
>>Bruce Who wrote:
>>
>>>Hi,
>>>
>>> How to map <Alt-3> to something? For example:
>>>
>>>    set winaltkeys=no
>>>    imap <Alt-3> dosomethinghere
>>>
>>>    and this one doesn't work too:
>>>
>>>    imap <Ctrl-3> dosomethinghere
>>>
>>>    Could anyone figure me out?
>>>
>>>Best regards,
>>>
>>>????????????????????????Bruce Who
>>>??????????????????????????????2005-06-03
>>>
>>>
>>>
>>
>>These may or may not work depending on your OS. In mappings, Alt-3 (when
>>recognised) is <M-3> or <A-3> while Ctrl-3 is <C-3> ; but on some
>>systems, one or both of them is simply not seen by gvim. IIRC, I could
>>make <M-3> work on Windows but not on Unix; however, even on Windows,
>>Alt-0 to Alt-9 clashed with some accented letters so they weren't
>>practical. Anyway, YMMV.
>
>
>     So, we could not use the combination of number and other keys as a map? Am I right?

On some systems, some of these compbinations are recognised. On others
not. Which are and which aren't is determined by experiment. Don't use
them when creating scripts for use by everybody.

>
>
>>See also my reply to Mike McNally < m5 -at- works.com >
>>
>>Best regards,
>>Tony.
>>
>
>
> = = = = = = = = = = = = = = = = = = = =
>
> Best regards,
>
> ????????????????????????Bruce Who
> ??????????????????????????????2005-06-03
>
>
>
>

Best regards,
Tony.

Loading...