Loading ...
Sorry, an error occurred while loading the content.

mapping alt-arrow

Expand Messages
  • Alan Schmitt
    Hello, After mapping cmd-arrow to behave as in other Mac apps (move to beginning and end of line), I would like to bind alt-arrow to b and f . However I
    Message 1 of 11 , Apr 20, 2006
    • 0 Attachment
      Hello,

      After mapping cmd-arrow to behave as in other Mac apps (move to
      beginning and end of line), I would like to bind alt-arrow to 'b' and
      'f'. However I cannot seem to find the shortcut to do it: how do I
      express "alt-right arrow"?

      Thanks,

      Alan

      --
      Alan Schmitt <http://alan.petitepomme.net/>

      The hacker: someone who figured things out and made something cool
      happen.
      .O.
      ..O
      OOO
    • Benji Fisher
      ... I think that ... should do it. HTH --Benji Fisher
      Message 2 of 11 , Apr 20, 2006
      • 0 Attachment
        On Thu, Apr 20, 2006 at 10:35:26AM +0200, Alan Schmitt wrote:
        > Hello,
        >
        > After mapping cmd-arrow to behave as in other Mac apps (move to
        > beginning and end of line), I would like to bind alt-arrow to 'b' and
        > 'f'. However I cannot seem to find the shortcut to do it: how do I
        > express "alt-right arrow"?
        >
        > Thanks,
        >
        > Alan

        I think that

        :map <M-Right> ...

        should do it.

        HTH --Benji Fisher
      • Alan Schmitt
        ... does nothing (alt-right behaves just as right by itself). The weird thing is that when I try to use ctrl-k to get the key directly in, I only get
        Message 3 of 11 , Apr 20, 2006
        • 0 Attachment
          On 20 avr. 06, at 14:34, Benji Fisher wrote:

          > On Thu, Apr 20, 2006 at 10:35:26AM +0200, Alan Schmitt wrote:
          >> Hello,
          >>
          >> After mapping cmd-arrow to behave as in other Mac apps (move to
          >> beginning and end of line), I would like to bind alt-arrow to 'b' and
          >> 'f'. However I cannot seem to find the shortcut to do it: how do I
          >> express "alt-right arrow"?
          >
          > I think that
          >
          > :map <M-Right> ...
          >
          > should do it.

          Unfortunately it does not work (I had tried but I tried again):
          :map <M-Right> e
          does nothing (alt-right behaves just as right by itself).

          The weird thing is that when I try to use "ctrl-k" to get the key
          directly in, I only get "<Right>", and both right cursor and alt-
          right get modified in this case. It's as if gvim wasn't seeing the key.

          (I'm using current CVS version of vim7, if it changes anything.)

          Alan

          --
          Alan Schmitt <http://alan.petitepomme.net/>

          The hacker: someone who figured things out and made something cool
          happen.
          .O.
          ..O
          OOO
        • Benji Fisher
          ... The CVS server is still broken. I recommend getting the latest snapshot from ftp://ftp.vim.org/pub/vim/unstable/snapshot/ if you can afford the bandwidth.
          Message 4 of 11 , Apr 20, 2006
          • 0 Attachment
            On Thu, Apr 20, 2006 at 04:35:04PM +0200, Alan Schmitt wrote:
            > On 20 avr. 06, at 14:34, Benji Fisher wrote:
            >
            > > I think that
            > >
            > >:map <M-Right> ...
            > >
            > >should do it.
            >
            > Unfortunately it does not work (I had tried but I tried again):
            > :map <M-Right> e
            > does nothing (alt-right behaves just as right by itself).
            >
            > The weird thing is that when I try to use "ctrl-k" to get the key
            > directly in, I only get "<Right>", and both right cursor and alt-
            > right get modified in this case. It's as if gvim wasn't seeing the key.
            >
            > (I'm using current CVS version of vim7, if it changes anything.)

            The CVS server is still broken. I recommend getting the latest
            snapshot from ftp://ftp.vim.org/pub/vim/unstable/snapshot/ if you can
            afford the bandwidth. There is also a subversion repository that should
            be no more than a day behind. Check the vim-dev archives for that.

            I tried using vim 7.0d from a week or two ago, and it did not work
            there. I tried it using the version I posted yesterday at
            http://macvim.org/OSX/index.php#Downloading
            and it worked. See my note from yesterday for the modifications I
            made.

            HTH --Benji Fisher
          • Alan Schmitt
            ... Thanks for the suggestion. I did that and got 7.0e04. ... The only modification I see is the ATSUI stuff, which I did not do (it should only affect
            Message 5 of 11 , Apr 21, 2006
            • 0 Attachment
              On 20 avr. 06, at 18:31, Benji Fisher wrote:

              > The CVS server is still broken. I recommend getting the latest
              > snapshot from ftp://ftp.vim.org/pub/vim/unstable/snapshot/ if you can
              > afford the bandwidth. There is also a subversion repository that
              > should
              > be no more than a day behind. Check the vim-dev archives for that.

              Thanks for the suggestion. I did that and got 7.0e04.

              > I tried using vim 7.0d from a week or two ago, and it did not
              > work
              > there. I tried it using the version I posted yesterday at
              > http://macvim.org/OSX/index.php#Downloading
              > and it worked. See my note from yesterday for the modifications I
              > made.

              The only modification I see is the ATSUI stuff, which I did not do
              (it should only affect anti-aliasing, shouldn't it?).

              Here is the status using this version compiled with features=huge and
              python interp:
              - <M-Right> still doesn't work :( It behaves as <Right> (more
              precisely: mapping <M-Right> does nothing and changes neither the
              behavior of <Right> nor <M-Right>; mapping <Right> changes the
              behavior of both.)
              - File association works :) This is great, and there is a pretty
              (new) icon too.
              - anti-aliasing does not work, as expected.

              Alan

              --
              Alan Schmitt <http://alan.petitepomme.net/>

              The hacker: someone who figured things out and made something cool
              happen.
              .O.
              ..O
              OOO
            • Benji Fisher
              ... Your guess is probably better than mine. ... I do not have any other suggestions. The main change that I know of between my trials with 7.0d and 7.0e02 is
              Message 6 of 11 , Apr 21, 2006
              • 0 Attachment
                On Fri, Apr 21, 2006 at 11:27:46AM +0200, Alan Schmitt wrote:
                > On 20 avr. 06, at 18:31, Benji Fisher wrote:
                >
                > The only modification I see is the ATSUI stuff, which I did not do
                > (it should only affect anti-aliasing, shouldn't it?).

                Your guess is probably better than mine.

                > Here is the status using this version compiled with features=huge and
                > python interp:
                > - <M-Right> still doesn't work :( It behaves as <Right> (more
                > precisely: mapping <M-Right> does nothing and changes neither the
                > behavior of <Right> nor <M-Right>; mapping <Right> changes the
                > behavior of both.)

                I do not have any other suggestions. The main change that I know
                of between my trials with 7.0d and 7.0e02 is the modification I
                mentioned, so maybe that change affects how Vim.app handles keys as well
                as antialiasing. I still think you should try it.

                > - File association works :) This is great, and there is a pretty
                > (new) icon too.

                Thanks for the confirmation.

                HTH --Benji Fisher
              • Alan Schmitt
                ... I m sure not, I was just asking for confirmation that this was the only change. ... I did update to the most recent version and did this change, and
                Message 7 of 11 , Apr 22, 2006
                • 0 Attachment
                  On 22 avr. 06, at 00:19, Benji Fisher wrote:

                  > On Fri, Apr 21, 2006 at 11:27:46AM +0200, Alan Schmitt wrote:
                  >> On 20 avr. 06, at 18:31, Benji Fisher wrote:
                  >>
                  >> The only modification I see is the ATSUI stuff, which I did not do
                  >> (it should only affect anti-aliasing, shouldn't it?).
                  >
                  > Your guess is probably better than mine.

                  I'm sure not, I was just asking for confirmation that this was the
                  only change.

                  >> Here is the status using this version compiled with features=huge and
                  >> python interp:
                  >> - <M-Right> still doesn't work :( It behaves as <Right> (more
                  >> precisely: mapping <M-Right> does nothing and changes neither the
                  >> behavior of <Right> nor <M-Right>; mapping <Right> changes the
                  >> behavior of both.)
                  >
                  > I do not have any other suggestions. The main change that I know
                  > of between my trials with 7.0d and 7.0e02 is the modification I
                  > mentioned, so maybe that change affects how Vim.app handles keys as
                  > well
                  > as antialiasing. I still think you should try it.

                  I did update to the most recent version and did this change, and
                  unfortunately it did not work. I guess I'll have to investigate further.

                  By the way, commenting out the ATSUI lines did make antialiasing
                  work, as expected.

                  Thanks,

                  Alan

                  --
                  Alan Schmitt <http://alan.petitepomme.net/>

                  The hacker: someone who figured things out and made something cool
                  happen.
                  .O.
                  ..O
                  OOO
                • Afternoon
                  Hi, I too am experiencing trouble mapping various key combinations in Vim 7, both 7.0c2 and 7.0e.02. I can t seem to map M combinations or D combinations,
                  Message 8 of 11 , Apr 22, 2006
                  • 0 Attachment
                    Hi,

                    I too am experiencing trouble mapping various key combinations in Vim
                    7, both 7.0c2 and 7.0e.02. I can't seem to map M combinations or D
                    combinations, although doing <D-o> opens a buffer successfully.

                    I'm also having problems mapping backspace, e.g. <M-BS> in both Vim 6
                    (my own build) and 7 (in GUI mode). I've had a bit of a read around
                    and it's clear that there are some terminal-related issues with
                    backspace. However, backspace is sending ^H as expected. :fixdel and
                    setting the value of t_kb doesn't seem to help any.

                    Basically I'm trying to map lots of the core OS X editing key
                    combinations. Any help/insight anyone can provide with either of
                    these questions would be much appreciated. Looking forward to getting
                    Vim 7 really cooking.

                    Ben

                    ________________________________
                    We're cycling through Cambodia to raise money for Oxfam, help us
                    raise £5,200!
                    http://cambodiachallenge.org/
                  • Benji Fisher
                    ... If opens a buffer successfully, then I think *some* maps must be working. Check ... This should tell you that it is defined in
                    Message 9 of 11 , Apr 24, 2006
                    • 0 Attachment
                      On Sat, Apr 22, 2006 at 08:40:29PM +0100, Afternoon wrote:
                      >
                      > Hi,
                      >
                      > I too am experiencing trouble mapping various key combinations in Vim
                      > 7, both 7.0c2 and 7.0e.02. I can't seem to map M combinations or D
                      > combinations, although doing <D-o> opens a buffer successfully.
                      >
                      > I'm also having problems mapping backspace, e.g. <M-BS> in both Vim 6
                      > (my own build) and 7 (in GUI mode). I've had a bit of a read around
                      > and it's clear that there are some terminal-related issues with
                      > backspace. However, backspace is sending ^H as expected. :fixdel and
                      > setting the value of t_kb doesn't seem to help any.
                      >
                      > Basically I'm trying to map lots of the core OS X editing key
                      > combinations. Any help/insight anyone can provide with either of
                      > these questions would be much appreciated. Looking forward to getting
                      > Vim 7 really cooking.
                      >
                      > Ben

                      If <D-o> opens a buffer successfully, then I think *some* <D-> maps
                      must be working. Check

                      :verbose map <D-o>

                      This should tell you that it is defined in $VIMRUNTIME/macmap.vim . Of
                      course, keys like <BS> are likely to be more problematic than alphabetic
                      characters.

                      I am afraid I cannot be much help on this. I can only tell you that
                      it works for me on two PPC Macs, running OS X 10.3.9 and 10.4.5. You
                      did not mention which version of OS X you are using.

                      HTH --Benji Fisher
                    • Afternoon
                      I ve been doing some more exploration of key mappings on Benji s new 7.0g build, using insert mode to get Vim to tell me what it s thinking: Keypress Yields
                      Message 10 of 11 , Apr 30, 2006
                      • 0 Attachment
                        I've been doing some more exploration of key mappings on Benji's new
                        7.0g build, using insert mode to get Vim to tell me what it's thinking:

                        Keypress Yields
                        ^V<Left> <Left>
                        ^V<Right> <Right>
                        ^V<D-Left> <C-D-\>
                        ^V<D-Right> <C-D-]>
                        ^V<D-Up> <C-D-^>
                        ^V<D-Down> <C-D-_>
                        ^V<M-Left> <Left>
                        ^V<M-Right> <Right>
                        ^V<M-Up> <Up>
                        ^V<M-Down> <Down>
                        ^V<BS> ^H
                        ^V<M-BS> ^H

                        So, shift seems to work, alt is broken and command is weird,
                        backspace is still not quite mapping correctly, regardless of fixdel
                        etc. By using these combinations I've managed to get back a lot of
                        the navigation keys I use, so I'm switching up to 7 now (for the time
                        being at least). However I'd still like to try and get that pesky
                        backspace sorted and it seems odd to me that <D-left> == <C-D-\> etc.

                        I'd also like to take this opportunity to once again recommend a
                        patch by Eckehard Burns which allows Cmd-. to be used as ^C during
                        external tasks (compiles, makes, etc). Cmd-. is the standard Mac stop-
                        doing-stuff-now key. As builds of 7 mature I think this is a nice
                        rounding off type feature. I've attached the patch for Vim 6.3, it
                        might need modifying for 7, I'm willing to take a look at that.

                        Ben
                      • Stephen Riehm
                        Hi Ben, ... I too just tried the new version, but shift is not working for me :-( For example: Keypress Yields Status according to Steve ;-) ======== ======
                        Message 11 of 11 , May 1 12:32 PM
                        • 0 Attachment
                          Hi Ben,

                          On 01.05.2006, at 02:08, Afternoon wrote:

                          > I've been doing some more exploration of key mappings on Benji's
                          > new 7.0g build, using insert mode to get Vim to tell me what it's
                          > thinking:
                          >
                          > Keypress Yields
                          > ^V<Left> <Left>
                          > ^V<Right> <Right>
                          > ^V<D-Left> <C-D-\>
                          > ^V<D-Right> <C-D-]>
                          > ^V<D-Up> <C-D-^>
                          > ^V<D-Down> <C-D-_>
                          > ^V<M-Left> <Left>
                          > ^V<M-Right> <Right>
                          > ^V<M-Up> <Up>
                          > ^V<M-Down> <Down>
                          > ^V<BS> ^H
                          > ^V<M-BS> ^H
                          >
                          > So, shift seems to work, alt is broken and command is weird,
                          > backspace is still not quite mapping correctly, regardless of
                          > fixdel etc.

                          I too just tried the new version, but shift is not working for me :-(
                          For example:
                          Keypress Yields Status according to Steve ;-)
                          ======== ====== =============================
                          ^V<S-Left> <Left> oops - should be <S-Left> or <S-C-D-\>
                          ^V<D--> <D--> ok
                          ^V<S-D--> <D--> oops - should be <S-D-->
                          ^V<D-9> -nothing- confused(1)
                          ^V<S-D-9> -nothing- confused(1)
                          ^V<S-D-[> <D-[> oops - should be <S-D-[> or <D-}>
                          ^V<S-D-=> <D-=> oops - should be <S-D-=> or <D-+>
                          ^V<D-,> <D-,> ok
                          ^V<S-D-,> <D-,> oops - should be <S-D-,>
                          ^V<D-.> -nothing- ok - CMD-. is Apple's "escape"
                          ^V<S-D-.> -nothing- oops - should be <S-D-.> or <D->>
                          ^V<D-/> <D-/> ok
                          ^V<S-D-/> <D-/> oops - should be <S-D-/>
                          ^V<S-D-Left> <C-S-D-\> ok
                          ^V<Del> <Del> ok
                          ^V<D-Del> <D-^?> ok
                          ^V<S-D-Del> <S-D-^?> ok
                          ^V<D-BS> <C-D-H> ok
                          ^V<S-D-BS> <C-S-D-H> ok
                          ^V<D-\> <D-Bslash> ok
                          ^V<S-D-\> <D-Bslash> oops - should be <S-D-Bslash>
                          ^V<D-a> <D-a> ok
                          ^V<S-D-a> <S-D-a> ok
                          ^V<D-PgUp> <C-D-K> ok
                          ^V<S-D-PgUp> <C-S-D-K> ok

                          (1): I was at first confused at what happened when I tested <D-[0-9]>.
                          After one keypress, nothing happened. After several, a character
                          appears.
                          This is explained in the digraphs help, ^V<decimal number> for
                          special characters by character number.
                          However, this shouldn't happen if modified by D- should it?
                          After I got around this (by not using ^V), <D-9> IS recognised as
                          <D-9> but <S-D-9> still comes out as <D-9>. The same applies for the
                          other digits.

                          Although this bug prevents me from moving up to version 7, I greatly
                          appreciate the work that has gone into this release... "well done" to
                          the developers! Here's hoping it turns out to be easy to fix :-)

                          Steve
                          I'm using OS-X 10.4.6, PPC/G4
                        Your message has been successfully submitted and would be delivered to recipients shortly.