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

Remapping Cmd Shift F to Function 5

Expand Messages
  • Birdie Edwards
    Hi all, I have tried several strategies to remap or (full screen mode) to F5 (function key 5) without success. I have done the following in my
    Message 1 of 9 , Jul 23, 2009
    • 0 Attachment
      Hi all,

      I have tried several strategies to remap <D-S-F> or <D-F> (full screen
      mode) to F5 (function key 5) without success.

      I have done the following in my gvimrc file in the MacVim package:

      macm Window.Toggle\ Full\ Screen\ Mode key=<nop>

      to "free up" the key combination to no avail.

      What am I missing?

      My apologies in advance for asking an elementary question :)

      Regards,

      Birdie

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • björn
      ... Hi Birdie, I m not sure exactly what you are trying because it works fine for me. If I add these two lines macm Window.Toggle Full Screen Mode
      Message 2 of 9 , Jul 23, 2009
      • 0 Attachment
        2009/7/23 Birdie Edwards:
        >
        > I have tried several strategies to remap <D-S-F> or <D-F> (full screen
        > mode) to F5 (function key 5) without success.
        >
        > I have done the following in my gvimrc file in the MacVim package:
        >
        > macm Window.Toggle\ Full\ Screen\ Mode  key=<nop>
        >
        > to "free up" the key combination to no avail.
        >
        > What am I missing?

        Hi Birdie,

        I'm not sure exactly what you are trying because it works fine for me.
        If I add these two lines

        macm Window.Toggle\ Full\ Screen\ Mode key=<nop>
        map! <D-F> <F1>

        to my "~/.gvimrc" file, then pressing Cmd-Shift-f in insert mode will
        open the help (as if <F1> had been pressed). If that doesn't work for
        you, tell us _exactly_ what you tried so that we can perhaps tell you
        where you went wrong.

        Björn

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_mac" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Birdie Edwards
        Thank you for your reply Björn. Thinking about it, I believe that I have certainly made one mistake. ... because, in fact, I *want* to use to enter Full
        Message 3 of 9 , Jul 23, 2009
        • 0 Attachment
          Thank you for your reply Björn.

          Thinking about it, I believe that I have certainly made one mistake.
          I don't think that I should be including the line:

          > macm Window.Toggle\ Full\ Screen\ Mode  key=<nop>

          because, in fact, I *want* to use <D-F> to enter Full Screen Mode.
          It's just that I *also* want to map F5 to <D-F>.

          Here is what I have tried:

          macm Window.Toggle\ Full\ Screen\ Mode key=<D-F>

          map <F5> <D-F>

          but it does not work. Pressing F5 in Normal Mode does *not* enter
          Full Screen Mode.

          In addition, pressing Shift-Command F sometimes enters Full Screen
          Mode, and sometimes doesn't. Which is strange.

          To sum up, all I am trying to do is simplify entering Full Screen Mode
          by mapping it to a single keystroke, instead of a three-stroke.

          Birdie
          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_mac" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • björn
          ... Indeed, not sure why this would happen. ... How about: map :set invfu map! :set invfu This is what the menu currently does (see :h fu
          Message 4 of 9 , Jul 23, 2009
          • 0 Attachment
            2009/7/23 Birdie Edwards:
            >
            > Thank you for your reply Björn.
            >
            > Thinking about it, I believe that I have certainly made one mistake.
            > I don't think that I should be including the line:
            >
            >> macm Window.Toggle\ Full\ Screen\ Mode  key=<nop>
            >
            > because, in fact, I *want* to use <D-F> to enter Full Screen Mode.
            > It's just that I *also* want to map F5 to <D-F>.
            >
            > Here is what I have tried:
            >
            >         macm Window.Toggle\ Full\ Screen\ Mode  key=<D-F>
            >
            >         map <F5> <D-F>
            >
            > but it does not work.  Pressing F5 in Normal Mode does *not* enter
            > Full Screen Mode.
            >
            > In addition, pressing Shift-Command F sometimes enters Full Screen
            > Mode, and sometimes doesn't.  Which is strange.

            Indeed, not sure why this would happen.

            > To sum up, all I am trying to do is simplify entering Full Screen Mode
            > by mapping it to a single keystroke, instead of a three-stroke.

            How about:

            map <F5> :set invfu<CR>
            map! <F5> :set invfu<CR>

            This is what the menu currently does (see ":h 'fu" for more info on fullscreen).

            The problem with your approach is that menu bindings (the ones set up
            with :macmenu) are sort of "outside" the normal Vim key mappings
            system (as far as Vim is concerned Cmd-Shift-f is not bound to
            anything). You can see what the menu bindings do by looking at the
            system gvimrc file ":fin $VIM/gvimrc"...just don't edit that file or
            your changes will be lost when you update MacVim.

            Björn

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_mac" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Birdie Edwards
            Forgive the long delay in replying. I am definitely coming much, much closer on this one, but I wanted to point out something. When I type :h fu or :h
            Message 5 of 9 , Jul 29, 2009
            • 0 Attachment
              Forgive the long delay in replying. I am definitely coming much, much
              closer on this one, but I wanted to point out something.

              When I type :h 'fu' or :h 'fullscreen'

              I get the following error message:

              E149 Sorry no help for 'fullscreen'

              Have I done something wrong. I type that in MacVim.

              Thanks for your help, once again,

              Birdie

              On Jul 23, 9:02 pm, björn <bjorn.winck...@...> wrote:
              > 2009/7/23 Birdie Edwards:

              > This is what the menu currently does (see ":h 'fu" for more info on fullscreen).
              >

              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_mac" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • björn
              ... Try renaming .vimrc/.gvimrc files and .vim folder. Still the same problem? Which MacVim version are you using? Check on MacVim menu - About MacVim.
              Message 6 of 9 , Jul 29, 2009
              • 0 Attachment
                2009/7/29 Birdie Edwards:
                >
                > Forgive the long delay in replying.  I am definitely coming much, much
                > closer on this one, but I wanted to point out something.
                >
                > When I type :h 'fu' or :h 'fullscreen'
                >
                > I get the following error message:
                >
                > E149 Sorry no help for 'fullscreen'
                >
                > Have I done something wrong.  I type that in MacVim.

                Try renaming .vimrc/.gvimrc files and .vim folder. Still the same problem?

                Which MacVim version are you using? Check on MacVim menu -> About MacVim.

                Björn

                --~--~---------~--~----~------------~-------~--~----~
                You received this message from the "vim_mac" maillist.
                For more information, visit http://www.vim.org/maillist.php
                -~----------~----~----~----~------~----~------~--~---
              • Birdie Edwards
                I am using Version 7.2 stable 1.2 (33.3). Please forgive me for being brain dead, but I honestly do not know what you mean when you say rename these files. I
                Message 7 of 9 , Jul 30, 2009
                • 0 Attachment
                  I am using Version 7.2 stable 1.2 (33.3).

                  Please forgive me for being brain dead, but I honestly do not know
                  what you mean when you say rename these files. I was under the
                  impression that the files had to have these names in order for Vim to
                  function.

                  It is true that there are copies of these files in my ~ home folder
                  and copies also in the MacVim package. Which should I rename?
                  Presumably those in my ~ home file. Is that correct?

                  On the other hand, the various modifications I have put in my ~ home
                  versions of these files/folder would need to go over into the MacVim
                  package I take it?

                  Thanks for you patience.

                  > Try renaming .vimrc/.gvimrc files and .vim folder.  Still the same problem?
                  >
                  > Which MacVim version are you using?  Check on MacVim menu -> About MacVim.
                  >
                  > Björn
                  --~--~---------~--~----~------------~-------~--~----~
                  You received this message from the "vim_mac" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                  -~----------~----~----~----~------~----~------~--~---
                • björn
                  ... I just tested it and the help works for me so there is definitely some problem on your end. ... No worries, I ll give you more details below...but before I
                  Message 8 of 9 , Jul 30, 2009
                  • 0 Attachment
                    2009/7/30 Birdie Edwards:
                    >> Try renaming .vimrc/.gvimrc files and .vim folder. Still the same problem?
                    >>
                    >> Which MacVim version are you using? Check on MacVim menu -> About MacVim.
                    >
                    > I am using Version 7.2 stable 1.2 (33.3).

                    I just tested it and the help works for me so there is definitely some
                    problem on your end.

                    > Please forgive me for being brain dead, but I honestly do not know
                    > what you mean when you say rename these files.  I was under the
                    > impression that the files had to have these names in order for Vim to
                    > function.

                    No worries, I'll give you more details below...but before I do I'd
                    like to ask you not to top-post, i.e. reply to posts like I do....that
                    makes my life a lot easier. Thanks!

                    This is what I asked you to do:

                    1. Open Terminal.app and enter the following lines

                    cd ~/
                    mv .vim old.vim
                    mv .vimrc old.vimrc
                    mv .gvimrc old.gvimrc

                    NOTE that it will complain if one of these files doesn't already exist
                    but that's ok (you could always skip the "mv" command if you know the
                    file/folder doesn't exist).

                    2. Restart MacVim, does the problem persist?

                    3. Restore your settings by reversing step 1, i.e. Open Terminal.app and type:

                    cd ~/
                    mv old.vim .vim
                    mv old.vimrc .vimrc
                    mv old.gvimrc .gvimrc

                    >
                    > It is true that there are copies of these files in my ~ home folder
                    > and copies also in the MacVim package.  Which should I rename?
                    > Presumably those in my ~ home file.  Is that correct?

                    Your local settings live in your home folder (~/) but only if you
                    added them yourself. These files (.vimrc/.gvimrc) are not created
                    automatically (same goes for the ~/.vim/ folder). There are also
                    default settings in the MacVim.app bundle but these you should never
                    touch as they get replaced each time you update MacVim.

                    >
                    > On the other hand, the various modifications I have put in my ~ home
                    > versions of these files/folder would need to go over into the MacVim
                    > package I take it?

                    I'm not sure what you mean by this, but maybe my comment above will
                    have answered this question?

                    Good luck,
                    Björn

                    --~--~---------~--~----~------------~-------~--~----~
                    You received this message from the "vim_mac" maillist.
                    For more information, visit http://www.vim.org/maillist.php
                    -~----------~----~----~----~------~----~------~--~---
                  • Birdie Edwards
                    ... These steps did not work (only the last step is copied above). So I placed the MacVim application folder in the trash and downloaded the application again.
                    Message 9 of 9 , Jul 30, 2009
                    • 0 Attachment
                      > ...
                      > cd ~/
                      > mv old.vim .vim
                      > mv old.vimrc .vimrc
                      > mv old.gvimrc .gvimrc

                      These steps did not work (only the last step is copied above).

                      So I placed the MacVim application folder in the trash and downloaded
                      the application again. Now it works. Somehow I had trashed the help
                      for fullscreen. I don't know how.

                      When I restored my .vim folder and my .vimrc file everything was still
                      okay.

                      I am sorry for the confusion. I probably should have re-downloaded
                      the app to begin with. Thank you very much for your help. My
                      understanding is tremendously increased. I would add that Vim is
                      probably the perfect text processor for older people because it
                      depends to no small extent on memory. Just a comment.

                      Thanks again,

                      Birdie
                      --~--~---------~--~----~------------~-------~--~----~
                      You received this message from the "vim_mac" maillist.
                      For more information, visit http://www.vim.org/maillist.php
                      -~----------~----~----~----~------~----~------~--~---
                    Your message has been successfully submitted and would be delivered to recipients shortly.