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

RFC: Autosave window dimensions

Expand Messages
  • björn
    Hi, I have implemented an autosave feature for MacVim so that the window dimensions (rows&columns) are restored when opening new windows. This feature works
    Message 1 of 6 , Aug 28 12:13 PM
    • 0 Attachment
      Hi,

      I have implemented an autosave feature for MacVim so that the window
      dimensions (rows&columns) are restored when opening new windows. This
      feature works much like the autosave for window position:

      1. When a new window opens and there are no other windows, its
      "autosave" flag is set
      2. When the "autosave window" is resized the dimensions (rows&columns)
      of that window are stored
      3. Any new window that opens will use the autosaved values for
      rows&columns by default
      4. If the user changes 'lines' or 'columns' in [g]vimrc these values
      take precedence
      5. Command line also takes precedence over autosave (e.g. "mvim -c
      "set lines=55" works as expected)

      I think this is a great feature for newcomers, but it has at least one
      drawback (that I can think of): if you only set 'lines' in your
      [g]vimrc then the autosaved value for 'columns' will still be used.

      This affects me for instance, since I only set 'lines' in my gvimrc
      and use the default 80 columns. One can argue that this is a minor
      issue since if I start MacVim from a Terminal window with !=80 columns
      then I run into the same problem. It is of course easily overcome by
      adding "set co=80" to my gvimrc, but the question is not whether I can
      overcome this -- it is whether the majority of MacVim users are ready
      to.

      So I am asking everybody reading on this list:

      Is this feature worth adding to MacVim (to simplify things for
      newcomers), or will it be too annoying to longtime users of Vim?


      Björn

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Wayne Seguin
      I use lines and columns however this feature will remove my need to do so. Awesome work björn! Thank you! ~Wayne On Aug 28, 2009, at 15:13 , björn wrote:=
      Message 2 of 6 , Aug 28 1:21 PM
      • 0 Attachment
        I use lines and columns however this feature will remove my need to do
        so.
        Awesome work björn! Thank you!

        ~Wayne

        On Aug 28, 2009, at 15:13 , björn wrote:=
        > Hi,
        >
        > I have implemented an autosave feature for MacVim so that the window
        > dimensions (rows&columns) are restored when opening new windows. This
        > feature works much like the autosave for window position:
        >
        > 1. When a new window opens and there are no other windows, its
        > "autosave" flag is set
        > 2. When the "autosave window" is resized the dimensions (rows&columns)
        > of that window are stored
        > 3. Any new window that opens will use the autosaved values for
        > rows&columns by default
        > 4. If the user changes 'lines' or 'columns' in [g]vimrc these values
        > take precedence
        > 5. Command line also takes precedence over autosave (e.g. "mvim -c
        > "set lines=55" works as expected)
        >
        > I think this is a great feature for newcomers, but it has at least one
        > drawback (that I can think of): if you only set 'lines' in your
        > [g]vimrc then the autosaved value for 'columns' will still be used.
        >
        > This affects me for instance, since I only set 'lines' in my gvimrc
        > and use the default 80 columns. One can argue that this is a minor
        > issue since if I start MacVim from a Terminal window with !=80 columns
        > then I run into the same problem. It is of course easily overcome by
        > adding "set co=80" to my gvimrc, but the question is not whether I can
        > overcome this -- it is whether the majority of MacVim users are ready
        > to.
        >
        > So I am asking everybody reading on this list:
        >
        > Is this feature worth adding to MacVim (to simplify things for
        > newcomers), or will it be too annoying to longtime users of Vim?
        >
        >
        > Björn
        >
        > >


        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_mac" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Nico Weber
        ... Sounds not annoying to me, but I m mostly indifferent. It would be much cooler if there was an option to save all windows s contents and positions
        Message 3 of 6 , Aug 28 7:35 PM
        • 0 Attachment
          > Is this feature worth adding to MacVim (to simplify things for
          > newcomers), or will it be too annoying to longtime users of Vim?

          Sounds not annoying to me, but I'm mostly indifferent.

          It would be much cooler if there was an option to save all windows's
          contents and positions (:mksession into some prefs dire and store
          number of windows and for every windows the session file on quit) :-)

          Nico

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_mac" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Nicolas
          It seems to be a good trade off for me. For the default column size set to 80 issue, if i assume that a fresh mac vim will show up with 80 columns (with no
          Message 4 of 6 , Aug 29 2:41 AM
          • 0 Attachment
            It seems to be a good trade off for me.

            For the default column size set to 80 issue, if i assume that a fresh
            mac vim will show up with 80 columns (with no setting in .gvimrc),
            then i would say that someone who wants to have his columns to 80 is
            less likely to resize the window, since the behavior is the same in a
            terminal : mac application windows retain their size for new windows.

            On Aug 28, 9:13 pm, björn <bjorn.winck...@...> wrote:
            > Hi,
            >
            > I have implemented an autosave feature for MacVim so that the window
            > dimensions (rows&columns) are restored when opening new windows.  This
            > feature works much like the autosave for window position:
            >
            > 1. When a new window opens and there are no other windows, its
            > "autosave" flag is set
            > 2. When the "autosave window" is resized the dimensions (rows&columns)
            > of that window are stored
            > 3. Any new window that opens will use the autosaved values for
            > rows&columns by default
            > 4. If the user changes 'lines' or 'columns' in [g]vimrc these values
            > take precedence
            > 5. Command line also takes precedence over autosave (e.g. "mvim -c
            > "set lines=55" works as expected)
            >
            > I think this is a great feature for newcomers, but it has at least one
            > drawback (that I can think of):  if you only set 'lines' in your
            > [g]vimrc then the autosaved value for 'columns' will still be used.
            >
            > This affects me for instance, since I only set 'lines' in my gvimrc
            > and use the default 80 columns.  One can argue that this is a minor
            > issue since if I start MacVim from a Terminal window with !=80 columns
            > then I run into the same problem.  It is of course easily overcome by
            > adding "set co=80" to my gvimrc, but the question is not whether I can
            > overcome this -- it is whether the majority of MacVim users are ready
            > to.
            >
            > So I am asking everybody reading on this list:
            >
            > Is this feature worth adding to MacVim (to simplify things for
            > newcomers), or will it be too annoying to longtime users of Vim?
            >
            > Björn

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_mac" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • björn
            ... Your assumption is correct: the first time you start MacVim the default rows&columns will be the Vim default (i.e. 80 columns x 24 rows). If you delete
            Message 5 of 6 , Aug 29 4:19 AM
            • 0 Attachment
              2009/8/29 Nicolas:
              >
              > It seems to be a good trade off  for me.
              >
              > For the default column size set to 80 issue, if i assume that a fresh
              > mac vim will show up with 80 columns (with no setting in .gvimrc),
              > then i would say that someone who wants to have his columns to 80 is
              > less likely to resize the window, since the behavior is the same in a
              > terminal : mac application windows retain their size for new windows.

              Your assumption is correct: the first time you start MacVim the
              default rows&columns will be the Vim default (i.e. 80 columns x 24
              rows). If you delete the MacVim preferences (defaults delete
              org.vim.MacVim) then the Vim defaults are once more used.

              Björn

              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_mac" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • björn
              I have pushed this patch into the repo now. I m not sure I am completely satisfied with it though, but we ll see if it gets in the way or not (if it does I
              Message 6 of 6 , Sep 1, 2009
              • 0 Attachment
                I have pushed this patch into the repo now. I'm not sure I am
                completely satisfied with it though, but we'll see if it gets in the
                way or not (if it does I may disable it).

                Björn

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