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

Re: how to prevent cmd+Q when multiple splits are open?

Expand Messages
  • Douglas Drumond
    ​Hi Tony,​ 2013/9/11 Tony Mechelynck ... ⌘Q é o atalho padrão para fechar aplicativos no Mac. -- Douglas Drumond *GDG
    Message 1 of 6 , Sep 11, 2013
    • 0 Attachment
      ​Hi Tony,​

      2013/9/11 Tony Mechelynck <antoine.mechelynck@...>
      I'm not on the Mac so (part of) what I'm saying below might not apply to you.

      ⌘Q é o atalho padrão para fechar aplicativos no Mac.


      --
      --
      You received this message from the "vim_mac" 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_mac" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • björn
      ... You could write a Vim function that conditioned on how many splits there are either does nothing, or calls :macaction terminate: . Then bind this to
      Message 2 of 6 , Oct 12, 2013
      • 0 Attachment
        On Tue, Sep 10, 2013 at 3:18 PM, leob wrote:
        >
        > Is there a way of preventing cmd+Q from closing when there are more than one buffer open via splits? Note that i'm not asking about tab's.

        You could write a Vim function that conditioned on how many splits
        there are either does nothing, or calls ":macaction terminate:". Then
        bind this to <D-q>. Since Cmd+Q is already bound to a menu item
        you'll have to unbind it first, see ":h cmd-key".

        Oh, no. Actually this won't work. Since the Quit item is under the
        special "MacVim" menu there is no way to undbind Cmd+Q. You could
        bind the above to some other key though (Cmd+Shift+Q? Ctrl+Q?).

        Other than that you'd have to edit the source code, but getting the
        number of open splits from Vim inside the MacVim process is probably
        going to be a bit tricky.

        Björn

        --
        --
        You received this message from the "vim_mac" 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_mac" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Bee
        It is possible to use System Preferences to add or change Keyboard Shortcuts for any Mac App. The following may be slightly different for versions of MacOS.
        Message 3 of 6 , Oct 12, 2013
        • 0 Attachment
          It is possible to use System Preferences to add or change Keyboard Shortcuts for any Mac App. The following may be slightly different for versions of MacOS.

          Apple Menu
          System Preferences
          Keyboard & Mouse
          Keyboard Shortcuts
          +
          Application: Other (find MacVim)
          Menu Title: Quit MacVim
          Keyboard Shortcut: command option quit

          You might also want to map <D-q>

          Bill

          --
          --
          You received this message from the "vim_mac" 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_mac" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • Douglas Drumond
          2013/9/12 Douglas Drumond ... ​ With this thread revived, I saw I wrote in Portuguese, sorry. It s irrelevant now, but for
          Message 4 of 6 , Oct 12, 2013
          • 0 Attachment

            2013/9/12 Douglas Drumond <drumond.douglas@...>
            ⌘Q é o atalho padrão para fechar aplicativos no Mac.
            With this thread revived, I saw I wrote in Portuguese, sorry. It's irrelevant now, but for completeness, I answered that ​⌘Q is the standard shortcut to close applications in Mac OS (due to comparison with Windows/Linux counterpart before).


            --
            Douglas Drumond

            --
            --
            You received this message from the "vim_mac" 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_mac" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
          Your message has been successfully submitted and would be delivered to recipients shortly.