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

Re: New snapshot (r38) of MacVim

Expand Messages
  • Robert Hicks
    ... Yes, it seems wierd since the carbon gvim closes with :q the last window. Isn t that the expected vim behavior though? Is the object to Macify Vim on
    Message 1 of 16 , Jul 31, 2007
    View Source
    • 0 Attachment
      björn wrote:
      > :q on the last buffer closes the window and not the app? Is that
      > intentional?
      >
      >
      > This is expected (Apple) behaviour for apps with multiple windows (e.g.
      > see what happens when you close the last window in Safari).
      >
      > The thing that is confusing is that the application you are running is
      > MacVim (the GUI) and not Vim, which is just a process associated with
      > one of MacVim's windows. When you type :q, you are telling Vim to quit,
      > but to MacVim this only means "close the window". To me this is not so
      > much of an issue, since I am used to hitting <D-q> to close apps on a
      > Mac anyway, but if you are coming from another OS this might seem weird.
      >

      Yes, it seems wierd since the carbon gvim closes with :q the last
      window. Isn't that the "expected" vim behavior though? Is the object to
      Macify Vim on OSX?

      Robert


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • björn
      ... I must be misunderstanding your question, because to me it seems like I already answered it in my last post. In any case, let me try to answer it again.
      Message 2 of 16 , Aug 1, 2007
      View Source
      • 0 Attachment
        >     :q on the last buffer closes the window and not the app? Is that
        >     intentional?
        >
        >
        > This is expected (Apple) behaviour for apps with multiple windows (e.g.
        > see what happens when you close the last window in Safari).
        >
        > The thing that is confusing is that the application you are running is
        > MacVim (the GUI) and not Vim, which is just a process associated with
        > one of MacVim's windows.  When you type :q, you are telling Vim to quit,
        > but to MacVim this only means "close the window".  To me this is not so
        > much of an issue, since I am used to hitting <D-q> to close apps on a
        > Mac anyway, but if you are coming from another OS this might seem weird.
        >

        Yes, it seems wierd since the carbon gvim closes with :q the last
        window. Isn't that the "expected" vim behavior though? Is the object to
        Macify Vim on OSX?

        I must be misunderstanding your question, because to me it seems like I already answered it in my last post.  In any case, let me try to answer it again.

        Carbon Vim is one application running one Vim process.  MacVim is one application running multiple Vim processes.  I.e. Carbon Vim is an application with only one window and MacVim is an application with multiple windows.  It is standard (Apple) behaviour that apps with only one window should quit when the window closes, whereas apps with multiple windows should only quit when the user selects "Quit" on the application's menu.  Thus, MacVim should _not_ quit when you type ":q" even if you only had one Vim process ( i.e. one window) open at that time.

        Of course, if many people object to this kind of behaviour in MacVim then I could change it.  But I would need a good reason to do so.  Saying that "Carbon Vim" behaves in this way is not enough of an argument to me.  I do appreciate the input though! :)


        /Björn

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_mac" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---

      • Robert Hicks
        björn wrote: ... I understand. It isn t just a Carbon Vim thing though or maybe I am crazy. When I have vim open :q closes vim when there are no
        Message 3 of 16 , Aug 1, 2007
        View Source
        • 0 Attachment
          björn wrote:
          <snip>
          > Of course, if many people object to this kind of behaviour in MacVim
          > then I could change it. But I would need a good reason to do so.
          > Saying that "Carbon Vim" behaves in this way is not enough of an
          > argument to me. I do appreciate the input though! :)
          >
          >
          I understand. It isn't just a "Carbon Vim" thing though or maybe I am
          crazy. When I have "vim" open :q closes vim when there are no other
          buffers open. On Windows and HP/UX when I use GVim and I :q when there
          are no other buffers open GVim exits entirely. It is only the MacVim one
          that behaves differently. I am not saying that is good or bad. I just
          wanted to make sure that it was the intended behavior since it is a
          "snapshot" and you would have liked feedback on it. : )

          Thanks for the answer and for the build. I do like it.

          Robert


          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_mac" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • björn
          ... This is kind of funny...just after having written that long rant I sat down and did some work on MacVim only to realise the menus behave very oddly if
          Message 4 of 16 , Aug 1, 2007
          View Source
          • 0 Attachment
            > Of course, if many people object to this kind of behaviour in MacVim
            > then I could change it.  But I would need a good reason to do so.
            > Saying that "Carbon Vim" behaves in this way is not enough of an
            > argument to me.  I do appreciate the input though! :)
            >
            >
            I understand. It isn't just a "Carbon Vim" thing though or maybe I am
            crazy. When I have "vim" open :q closes vim when there are no other
            buffers open. On Windows and HP/UX when I use GVim and I :q when there
            are no other buffers open GVim exits entirely. It is only the MacVim one
            that behaves differently. I am not saying that is good or bad. I just
            wanted to make sure that it was the intended behavior since it is a
            "snapshot" and you would have liked feedback on it.  : )

            Thanks for the answer and for the build. I do like it.

            This is kind of funny...just after having written that long rant I sat down and did some work on MacVim only to realise the menus behave very oddly if there are no Vim windows open.  The best short-term solution was to...here it comes...make MacVim quit automatically when the last window closes.  :)

            So lets see if anybody has any objections as to why MacVim _shouldn't_ quit when the last window closes.  Like Robert says, the good side to this solution is that this is more familiar to Vim users from other platforms;  the bad side is that it is not standard Apple behaviour.  Which one do people think is the lesser evil here?


            /Björn

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_mac" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---

          • Jeremy Conlin
            ... IMHO, I think an app should close when its last window is close. I realize this isn t very Mac like, but this is a soft rule. There are many apps that
            Message 5 of 16 , Aug 2, 2007
            View Source
            • 0 Attachment
              On 8/2/07, björn <bjorn.winckler@...> wrote:
              This is kind of funny...just after having written that long rant I sat down and did some work on MacVim only to realise the menus behave very oddly if there are no Vim windows open.  The best short-term solution was to...here it comes...make MacVim quit automatically when the last window closes.  :)

              So lets see if anybody has any objections as to why MacVim _shouldn't_ quit when the last window closes.  Like Robert says, the good side to this solution is that this is more familiar to Vim users from other platforms;  the bad side is that it is not standard Apple behaviour.  Which one do people think is the lesser evil here?
               


              IMHO, I think an app should close when its last window is close.  I realize this isn't very Mac like, but this is a soft rule.  There are many apps that quit when their last window is closed.  In short, I think its an old tradition that is dying.

              Jeremy

              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_mac" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---

            • björn
              ... Yes, don t get me wrong here...the intentions are to make MacVim follow the HIG as much as is judged sensible (by me and whoever voices an opinion on this
              Message 6 of 16 , Aug 3, 2007
              View Source
              • 0 Attachment
                >
                > It should do what the HIG says; ie stay open. Disable the menus if there's
                > no window. That way, I can hit Cmd-N to open a new vim window, and opening
                > files is slightly faster because the app is already loaded (atm, this is not
                > really true because each window spawns its own process, but in the long run
                > it might be).
                >
                > Nico

                another vote for following the HIG. i was under the impression that
                this project was to make a more Mac-like vim. there could always be a
                preference to quit the app when closing the last window.

                Yes, don't get me wrong here...the intentions are to make MacVim follow the HIG as much as is judged sensible (by me and whoever voices an opinion on this group).  I only violated the "stay-open" rule because I ran into a minor problem, and thought I'd ask for everybody's opinion on this issue.

                I will add a user default which controls whether MacVim should quit when the last window closes, and the default will follow the HIG.


                /Björn

                --~--~---------~--~----~------------~-------~--~----~
                You received this message from the "vim_mac" maillist.
                For more information, visit http://www.vim.org/maillist.php
                -~----------~----~----~----~------~----~------~--~---

              • Robert Hicks
                ... Maybe because I am used to doing :q on every other operating system? Make it play nice sure but lets not change expected behavior. Robert
                Message 7 of 16 , Aug 3, 2007
                View Source
                • 0 Attachment
                  Nico Weber wrote:
                  >> Yes, don't get me wrong here...the intentions are to make MacVim
                  >> follow the HIG as much as is judged sensible (by me and whoever
                  >> voices an opinion on this group). I only violated the "stay-open"
                  >> rule because I ran into a minor problem, and thought I'd ask for
                  >> everybody's opinion on this issue.
                  >
                  > Don't let your app be dictated by small implementation problems ;-)
                  >
                  >> I will add a user default which controls whether MacVim should quit
                  >> when the last window closes, and the default will follow the HIG.
                  >
                  > Why even have an option? Hitting cmd-q is even quicker than :q, all
                  > people using a mac know cmd-q, only very few people will change this
                  > preference and it makes the code a tiny bit more complex :-P
                  >

                  Maybe because I am used to doing :q on every other operating system?
                  Make it play nice sure but lets not change expected behavior.

                  Robert


                  --~--~---------~--~----~------------~-------~--~----~
                  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.