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

Tabs revisited

Expand Messages
  • YW Law
    Hi, I m new to the list. I have two questions, if I make a patch (1) for making tabs (like those of Mozilla, Firefox, Ultraedit etc.), and (2) for enabling
    Message 1 of 21 , May 25, 2004
    • 0 Attachment
      Hi, I'm new to the list. I have two questions, if I make a patch
      (1) for making tabs (like those of Mozilla, Firefox, Ultraedit etc.), and
      (2) for enabling transparent icon background, as in

      http://wwwhome.cs.utwente.nl/~ywlaw/vimtabbed2.jpg

      would my patch be accepted? I have looked through previous mail
      archives, and found that all previous requests for tabs have been turned
      down, I venture anyway to voice my opinion. Split windows never work for me.

      Thanks, and looking forward to some opinion.
    • Halim, Salman
      While I personally don t have a problem with explicit tabs (and I like fancy GUI gadgets!), two things to consider: - Will the patch work on GVim instances on
      Message 2 of 21 , May 25, 2004
      • 0 Attachment
        While I personally don't have a problem with explicit tabs (and I like fancy GUI gadgets!), two things to consider:

        - Will the patch work on GVim instances on all platforms?

        - Have you considered using the minibufexpl? It just resurfaced recently on vim.sf.net: http://vim.sourceforge.net/scripts/script.php?script_id=159 and is a complete Vim-script-only solution (it's a plugin).

        Admittedly, I probably wouldn't use this feature: I rarely use the mouse in GVim.

        Regards,

        Salman.

        > -----Original Message-----
        > From: YW Law [mailto:ywlaw@...]
        > Sent: Tuesday, May 25, 2004 5:13 PM
        > To: vim-dev@...
        > Subject: Tabs revisited
        >
        >
        > Hi, I'm new to the list. I have two questions, if I make a patch
        > (1) for making tabs (like those of Mozilla, Firefox,
        > Ultraedit etc.), and
        > (2) for enabling transparent icon background, as in
        >
        > http://wwwhome.cs.utwente.nl/~ywlaw/vimtabbed2.jpg
        >
        > would my patch be accepted? I have looked through previous mail
        > archives, and found that all previous requests for tabs have
        > been turned
        > down, I venture anyway to voice my opinion. Split windows
        > never work for me.
        >
        > Thanks, and looking forward to some opinion.
        >
      • Benji Fisher
        ... Once vim 6.3 final is released (maybe in a few days, maybe in a couple more weeks) work will begin on developing vim 7.0. At that point, new features
        Message 3 of 21 , May 25, 2004
        • 0 Attachment
          On Tue, May 25, 2004 at 11:13:17PM +0200, YW Law wrote:
          > Hi, I'm new to the list. I have two questions, if I make a patch
          > (1) for making tabs (like those of Mozilla, Firefox, Ultraedit etc.), and
          > (2) for enabling transparent icon background, as in
          >
          > http://wwwhome.cs.utwente.nl/~ywlaw/vimtabbed2.jpg
          >
          > would my patch be accepted? I have looked through previous mail
          > archives, and found that all previous requests for tabs have been turned
          > down, I venture anyway to voice my opinion. Split windows never work for me.
          >
          > Thanks, and looking forward to some opinion.

          Once vim 6.3 final is released (maybe in a few days, maybe in a
          couple more weeks) work will begin on developing vim 7.0. At that
          point, new features (such as tabs) have a better chance of getting in.
          No promises, of course, but submitting a patch is the best way to get
          the ball rolling. If it turns out to be popular, it will get into the
          official release.

          Currently, this item is #11 on the list of feature requests, which
          is not bad. (Improved support for Mac OS 9 is way at the bottom ...)

          HTH --Benji Fisher
        • Steve Hall
          ... For tabs, you might start with one that already worked: http://groups.yahoo.com/group/vimdev/message/34288 (Not sure if there s been progress since this
          Message 4 of 21 , May 25, 2004
          • 0 Attachment
            On Tue, 2004-05-25 at 17:13, YW Law wrote:
            > Hi, I'm new to the list. I have two questions, if I make a patch
            > (1) for making tabs (like those of Mozilla, Firefox, Ultraedit
            > etc.), and
            > (2) for enabling transparent icon background, as in
            >
            > http://wwwhome.cs.utwente.nl/~ywlaw/vimtabbed2.jpg
            >
            > would my patch be accepted? I have looked through previous mail
            > archives, and found that all previous requests for tabs have been
            > turned down, I venture anyway to voice my opinion. Split windows
            > never work for me.

            For tabs, you might start with one that already worked:

            http://groups.yahoo.com/group/vimdev/message/34288

            (Not sure if there's been progress since this point or not.)

            As for transparent icons, on Windows, I've found you must use a 16
            color palette, the transparent color being RGB 192-192-192 (c0c0c0):

            http://cream.sourceforge.net/screenshot2.png

            HTH.


            --
            Steve Hall [ digitect@... ]
          • YW Law
            Hi Steve, thanks for the pointer on the icon background, i m utterly grateful! Benji, Salam, thanks very much for your feedback. as for the tabbed window
            Message 5 of 21 , May 26, 2004
            • 0 Attachment
              Hi Steve, thanks for the pointer on the icon background, i'm utterly
              grateful!

              Benji, Salam, thanks very much for your feedback.

              as for the tabbed window patch, i have looked at the thread you
              mentioned, and i will follow up with the patch author Christian Michon.


              Law




              Steve Hall wrote:

              > On Tue, 2004-05-25 at 17:13, YW Law wrote:
              >
              >> Hi, I'm new to the list. I have two questions, if I make a patch
              >> (1) for making tabs (like those of Mozilla, Firefox, Ultraedit
              >> etc.), and
              >> (2) for enabling transparent icon background, as in
              >>
              >> http://wwwhome.cs.utwente.nl/~ywlaw/vimtabbed2.jpg
              >>
              >> would my patch be accepted? I have looked through previous mail
              >> archives, and found that all previous requests for tabs have been
              >> turned down, I venture anyway to voice my opinion. Split windows
              >> never work for me.
              >
              >
              >
              > For tabs, you might start with one that already worked:
              >
              > http://groups.yahoo.com/group/vimdev/message/34288
              >
              > (Not sure if there's been progress since this point or not.)
              >
              > As for transparent icons, on Windows, I've found you must use a 16
              > color palette, the transparent color being RGB 192-192-192 (c0c0c0):
              >
              > http://cream.sourceforge.net/screenshot2.png
              >
              > HTH.
              >
              >
            • Antoine J. Mechelynck
              ... How is it exactly that they never work for you ? Would it work better if they looked more like full-size tabbed windows? Try the following (replacing gvim
              Message 6 of 21 , May 26, 2004
              • 0 Attachment
                YW Law <ywlaw@...> wrote:
                > Hi, I'm new to the list. I have two questions, if I make a patch
                > (1) for making tabs (like those of Mozilla, Firefox, Ultraedit etc.),
                > and (2) for enabling transparent icon background, as in
                >
                > http://wwwhome.cs.utwente.nl/~ywlaw/vimtabbed2.jpg
                >
                > would my patch be accepted? I have looked through previous mail
                > archives, and found that all previous requests for tabs have been
                > turned down, I venture anyway to voice my opinion. Split windows
                > never work for me.
                >
                > Thanks, and looking forward to some opinion.

                How is it exactly that they "never work for you"? Would it work better if
                they looked more like full-size tabbed windows? Try the following (replacing
                gvim by vim everywhere if you prefer the "console" version):

                1. Add (if it isn't there already) the following line to your vimrc:

                set ls=2 wmh=0 wh=9999 noea awa sb

                2. Save the modified vimrc, close vim if it was open.
                3. Launch vim by typing the following command-line in the shell:

                gvim -o fname1 fname2 fname3

                You notice that only one of the three files is displayed; but the names of
                all three are shown at the (top and) bottom of the screen, with the current
                one in bold type (or maybe in a different color) just below the text. Those
                filenames (or status lines, as they are usually called) are your "tabs".
                Click any one of them with the mouse (go ahead, try it), and -plop- the
                corresponding file is displayed before you. This works like a dictionary
                with thumb tabs: some tabs are "before" (above) what you are currently
                looking at, others are "after" (below) it, but they are always there in the
                same order (unless, in Vim, you change the order, but we won't go into that
                today).

                The following commands apply to this kind of "tabbed" editing:

                :q

                closes the current tab, and, if it is the last one, the whole editor. If
                there are changes, they are saved before closing.

                :q!

                does the same, but without saving eny changes

                :new

                opens a new tab on an empty buffer. The new tab is placed just below the
                current one.

                :new filename

                creates a new tab and loads "filename" in it.

                :top new

                creates an empty new tab at the very top and opens it

                :bot new filename

                opens "filename" in a new tab at the very bottom.

                :edit filename

                replaces the contents of the current tab with the file "filename". If the
                current file has modifications, they will first be saved.

                :edit! filename

                does the same without saving any changes.

                :saveas filename

                saves the contents of the current tab under the name "filename" and starts
                editing the new file in the same tab.

                :w filename

                saves a copy of the current file under the name "filename", but goes on
                editing the same file as before (under the old name).

                etc.

                If you want vim to ask you rather than automatically save changes when
                quitting a tab without a ! bang, remove the 'awa' ('autowriteall') option
                in the "set" command shown earlier.

                HTH,
                Tony.
              • Nowhere Man
                From: Antoine J. Mechelynck Date: Thu May 27, 2004 1:11 am How is it exactly that they never work for you ? Would it work
                Message 7 of 21 , May 27, 2004
                • 0 Attachment
                  From: "Antoine J. Mechelynck" <antoine.mechelynck@b...>
                  Date: Thu May 27, 2004 1:11 am

                  How is it exactly that they "never work for you"? Would it work better if
                  they looked more like full-size tabbed windows? Try the following (replacing
                  gvim by vim everywhere if you prefer the "console" version):

                  1. Add (if it isn't there already) the following line to your vimrc:

                  set ls=2 wmh=0 wh=9999 noea awa sb

                  2. Save the modified vimrc, close vim if it was open.
                  3. Launch vim by typing the following command-line in the shell:

                  gvim -o fname1 fname2 fname3

                  You notice that only one of the three files is displayed; but the names of
                  all three are shown at the (top and) bottom of the screen, with the current
                  one in bold type (or maybe in a different color) just below the text. Those
                  filenames (or status lines, as they are usually called) are your "tabs".
                  Click any one of them with the mouse (go ahead, try it), and -plop- the
                  corresponding file is displayed before you. This works like a dictionary
                  with thumb tabs: some tabs are "before" (above) what you are currently
                  looking at, others are "after" (below) it, but they are always there in the
                  same order (unless, in Vim, you change the order, but we won't go into that
                  today).

                  [snip]

                  ---------

                  I tried using this, and I believe it revealed a bug. If wh=999 and wmh=0,
                  it would only open two windows, but open each file into separate buffers.

                  In the help files, it indicates to use "winheight=999" to indicate that
                  windows should take the whole screen, but in the source code, there is no
                  special handling for 999 (that I can find). I have attached a small patch
                  to window.c that recognizes this setting and allows each file to be opened
                  in a separate window.

                  - Patrick
                • Bram Moolenaar
                  ... The number 999 is just a large number, it doesn t have a special meaning otherwise. If you set winheight to a large number, it means you want to use as
                  Message 8 of 21 , May 28, 2004
                  • 0 Attachment
                    Nowhere man (name?) wrote:

                    > I tried using this, and I believe it revealed a bug. If wh=999 and wmh=0,
                    > it would only open two windows, but open each file into separate buffers.
                    >
                    > In the help files, it indicates to use "winheight=999" to indicate that
                    > windows should take the whole screen, but in the source code, there is no
                    > special handling for 999 (that I can find). I have attached a small patch
                    > to window.c that recognizes this setting and allows each file to be opened
                    > in a separate window.

                    The number 999 is just a large number, it doesn't have a special meaning
                    otherwise.

                    If you set 'winheight' to a large number, it means you want to use as
                    much space as possible for the current window. Thus almost no other
                    windows will fit.

                    If you want to use as many windows as possible, you'll have to set
                    'winheight' to a low number. Otherwise the "minimal number of lines in
                    a window' value would be meaningless. You could do this temporarily.

                    --
                    Engineers will go without food and hygiene for days to solve a problem.
                    (Other times just because they forgot.)
                    (Scott Adams - The Dilbert principle)

                    /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                    /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                    \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
                    \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
                  • Vince Negri
                    ... That would be reasonable, except that what happens with vim -o file1 file2 file3 is that *two* windows are created. Not three (the poster s wish) and not
                    Message 9 of 21 , May 28, 2004
                    • 0 Attachment
                      > If you set 'winheight' to a large number, it means you want to use as
                      > much space as possible for the current window. Thus almost no other
                      > windows will fit.

                      > If you want to use as many windows as possible, you'll have to set
                      > 'winheight' to a low number. Otherwise the "minimal number of lines in
                      > a window' value would be meaningless. You could do this temporarily.

                      That would be reasonable, except that what happens with
                      vim -o file1 file2 file3 is that *two* windows are created.
                      Not three (the poster's wish) and not one (which the strict
                      interpretation of 'winheight' you give would indicate.)

                      Or to put it another way: given that wh=999 means that you
                      want the window to use all available space, why does vim
                      allow the creation of one other zero-height window, but not
                      a second?

                      Some more experimentation reveals
                      (with wmh=0 wh=999 in .vimrc)

                      vim file1 file2
                      :all
                      <reports "E36: Not enough room">

                      vim -o file1 file2
                      <opens two windows, one at zero height>

                      So perhaps the problem is that vim -o is behaving
                      inconsistently.



                      > -----Original Message-----
                      > From: Bram Moolenaar [SMTP:Bram@...]
                      > Sent: Friday, May 28, 2004 2:25 PM
                      > To: Nowhere Man
                      > Cc: vim-dev@...
                      > Subject: Re: Tabs revisited
                      >
                      >
                      > Nowhere man (name?) wrote:
                      >
                      > > I tried using this, and I believe it revealed a bug. If wh=999 and
                      > wmh=0,
                      > > it would only open two windows, but open each file into separate
                      > buffers.
                      > >
                      > > In the help files, it indicates to use "winheight=999" to indicate that
                      > > windows should take the whole screen, but in the source code, there is
                      > no
                      > > special handling for 999 (that I can find). I have attached a small
                      > patch
                      > > to window.c that recognizes this setting and allows each file to be
                      > opened
                      > > in a separate window.
                      >
                      > The number 999 is just a large number, it doesn't have a special meaning
                      > otherwise.
                      >
                      > If you set 'winheight' to a large number, it means you want to use as
                      > much space as possible for the current window. Thus almost no other
                      > windows will fit.
                      >
                      > If you want to use as many windows as possible, you'll have to set
                      > 'winheight' to a low number. Otherwise the "minimal number of lines in
                      > a window' value would be meaningless. You could do this temporarily.
                      >
                      > --
                      > Engineers will go without food and hygiene for days to solve a problem.
                      > (Other times just because they forgot.)
                      > (Scott Adams - The Dilbert principle)
                      >
                      > /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net
                      > \\\
                      > /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/
                      > \\\
                      > \\\ Project leader for A-A-P -- http://www.A-A-P.org
                      > ///
                      > \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html
                      > ///
                      Legal Disclaimer: Any views expressed by the sender of this message are
                      not necessarily those of Application Solutions Ltd. Information in this
                      e-mail may be confidential and is for the use of the intended recipient
                      only, no mistake in transmission is intended to waive or compromise such
                      privilege. Please advise the sender if you receive this e-mail by mistake.
                    • Benji Fisher
                      ... Or maybe it is :all that is inconsistent: I do not get an error from vim -N -u NONE + set wmh=0 wh=99 ls=2 file1 file2 ... Maybe I missed something. If
                      Message 10 of 21 , May 28, 2004
                      • 0 Attachment
                        On Fri, May 28, 2004 at 03:33:01PM +0100, Vince Negri wrote:
                        > > If you set 'winheight' to a large number, it means you want to use as
                        > > much space as possible for the current window. Thus almost no other
                        > > windows will fit.
                        >
                        > > If you want to use as many windows as possible, you'll have to set
                        > > 'winheight' to a low number. Otherwise the "minimal number of lines in
                        > > a window' value would be meaningless. You could do this temporarily.
                        >
                        > That would be reasonable, except that what happens with
                        > vim -o file1 file2 file3 is that *two* windows are created.
                        > Not three (the poster's wish) and not one (which the strict
                        > interpretation of 'winheight' you give would indicate.)
                        >
                        > Or to put it another way: given that wh=999 means that you
                        > want the window to use all available space, why does vim
                        > allow the creation of one other zero-height window, but not
                        > a second?
                        >
                        > Some more experimentation reveals
                        > (with wmh=0 wh=999 in .vimrc)
                        >
                        > vim file1 file2
                        > :all
                        > <reports "E36: Not enough room">
                        >
                        > vim -o file1 file2
                        > <opens two windows, one at zero height>
                        >
                        > So perhaps the problem is that vim -o is behaving
                        > inconsistently.

                        Or maybe it is :all that is inconsistent: I do not get an error
                        from

                        vim -N -u NONE +"set wmh=0 wh=99 ls=2" file1 file2
                        :snext

                        Maybe I missed something. If I open three files (either from the
                        command line with the -o option or by using :sp after vim starts up)
                        then I get three windows; two of them show up as just status lines.

                        HTH --Benji Fisher
                      • Antoine J. Mechelynck
                        ... [...] ... [...] ... The value 999 has nothing special, except that it is usually bigger than the amount of lines of text in a typical vim window. If your
                        Message 11 of 21 , May 28, 2004
                        • 0 Attachment
                          Nowhere Man <pi-rho@...> wrote:
                          > From: "Antoine J. Mechelynck" antoine.mechelynck@b...
                          [...]
                          > 1. Add (if it isn't there already) the following line to your vimrc:
                          [...]
                          > I tried using this, and I believe it revealed a bug. If wh=999 and
                          > wmh=0, it would only open two windows, but open each file into
                          > separate buffers.
                          >
                          > In the help files, it indicates to use "winheight=999" to indicate
                          > that windows should take the whole screen, but in the source code,
                          > there is no special handling for 999 (that I can find). I have
                          > attached a small patch to window.c that recognizes this setting and
                          > allows each file to be opened in a separate window.
                          >
                          > - Patrick

                          The value 999 has nothing special, except that it is usually bigger than the
                          amount of lines of text in a typical vim window. If your screen is so big
                          and/or your 'guifont' so small that there are more than 999 lines on _your_
                          screen, then use 9999 or even 99999 instead.

                          Vim tries to make the current window at least 'winheight' lines high, not
                          including the status line, but that is not a fixed minimum: if your window
                          is too small, you'll get only what you have room for (which is what I
                          intend).

                          OTOH, 'winminheight' is a fixed minimum for _any_ window, current or not; by
                          setting it to zero, we allow all non-current windows to be reduced to just a
                          status line and nothing else. Since clicking on a status line makes its
                          window current, those status lines are what I use as "tabs". If my analogy
                          of dictionary thumb tabs didn't strike a light, then think of a book with
                          coloured page-edges marking off sections.

                          Status lines ("tabs") are at the top or bottom of the Vim screen depending
                          on whether they are for a window before or after the current one. The
                          current one is always just below the current window, and uses a different
                          highlight (usually bold-reverse rather than normal-reverse).

                          Regards,
                          Tony.
                        • Nowhere Man
                          ... I understand what you were saying. And I got it to work... It looks pretty neat. My patch was to fix the following: [in vimrc: wh=999, wmh=0, noea, sb]
                          Message 12 of 21 , May 28, 2004
                          • 0 Attachment
                            > -----Original Message-----
                            > From: Antoine J. Mechelynck [mailto:antoine.mechelynck@...]
                            > Sent: Friday, May 28, 2004 12:06 PM
                            > To: Nowhere Man; vim-dev@...
                            > Subject: Re: Tabs revisited
                            >
                            > Nowhere Man <pi-rho@...> wrote:
                            > > From: "Antoine J. Mechelynck" antoine.mechelynck@b...
                            > [...]
                            > > 1. Add (if it isn't there already) the following line to your vimrc:
                            > [...]
                            > > I tried using this, and I believe it revealed a bug. If wh=999 and
                            > > wmh=0, it would only open two windows, but open each file into
                            > > separate buffers.
                            > >
                            > > In the help files, it indicates to use "winheight=999" to indicate
                            > > that windows should take the whole screen, but in the source code,
                            > > there is no special handling for 999 (that I can find). I have
                            > > attached a small patch to window.c that recognizes this setting and
                            > > allows each file to be opened in a separate window.
                            > >
                            > > - Patrick
                            >
                            > The value 999 has nothing special, except that it is usually
                            > bigger than the amount of lines of text in a typical vim
                            > window. If your screen is so big and/or your 'guifont' so
                            > small that there are more than 999 lines on _your_ screen,
                            > then use 9999 or even 99999 instead.
                            > [snip]

                            I understand what you were saying. And I got it to work... It looks pretty
                            neat. My patch was to fix the following:

                            [in vimrc: wh=999, wmh=0, noea, sb]

                            vim -o file1 file2 file3 file4
                            :: this creates two windows and 4 buffers with the first two buffers in the
                            windows (in window.c/make_windows() maxcount is set to 2 since the
                            calculation gives a negative number).

                            vim then :new file1<CR>:new file2<CR>:new file3<CR>:new file4<CR>
                            :: this creates four windows with a buffer in each and works as expected.

                            [ in vimrc: remove set wh or set to the default (1) ]
                            vim -o file1 file2 file3 file4
                            :: this creates four windows, but each window is of equal height even though
                            "noea" is set.


                            Maybe 999 shouldn't be used, maybe winheight=0 should mean use all available
                            lines, except for statuslines.
                          • Benji Fisher
                            ... I see something different, but it still looks like a bug. Instead of adding a line to my vimrc, I skipped the vimrc file and set the various options when
                            Message 13 of 21 , May 28, 2004
                            • 0 Attachment
                              On Fri, May 28, 2004 at 04:48:37PM -0500, Nowhere Man wrote:
                              >
                              > I understand what you were saying. And I got it to work... It looks pretty
                              > neat. My patch was to fix the following:
                              >
                              > [in vimrc: wh=999, wmh=0, noea, sb]
                              >
                              > vim -o file1 file2 file3 file4
                              > :: this creates two windows and 4 buffers with the first two buffers in the
                              > windows (in window.c/make_windows() maxcount is set to 2 since the
                              > calculation gives a negative number).
                              >
                              > vim then :new file1<CR>:new file2<CR>:new file3<CR>:new file4<CR>
                              > :: this creates four windows with a buffer in each and works as expected.

                              I see something different, but it still looks like a bug. Instead
                              of adding a line to my vimrc, I skipped the vimrc file and set the
                              various options when starting vim:

                              $ vim -N -u NONE +"set wh=999 wmh=0 noea sb" -o file1 file2 file3 file4

                              Please try it this way, just in case there is something else in your
                              vimrc file that affects this behavior.

                              Instead of seeing two windows and 4 buffers, I get 4 windows:
                              three of them have one status line *and* one text line, and the fourth
                              takes up the rest of the terminal. When I cycle to the bottom window,
                              or

                              :set wh=999

                              the three small windows collapse to just a status line each.

                              My version: vim 6.3b (no extra patches) on Red Hat 9 Linux. Same
                              behavior with either gvim or whatever the default terminal (Gnome?) is.

                              > [ in vimrc: remove set wh or set to the default (1) ]
                              > vim -o file1 file2 file3 file4
                              > :: this creates four windows, but each window is of equal height even though
                              > "noea" is set.

                              That does not bother me.

                              > Maybe 999 shouldn't be used, maybe winheight=0 should mean use all available
                              > lines, except for statuslines.

                              No opinion.

                              HTH --Benji Fisher
                            • Nowhere Man
                              ... Yes, same here... If the commands are issued after vim is running it behaves correctly. If the commands are in vimrc, it only creates two windows. Sorry
                              Message 14 of 21 , May 28, 2004
                              • 0 Attachment
                                > -----Original Message-----
                                > From: Benji Fisher [mailto:benji@...]
                                > Sent: Friday, May 28, 2004 10:05 PM
                                > To: vim-dev@...
                                > Subject: Re: Tabs revisited
                                >
                                > On Fri, May 28, 2004 at 04:48:37PM -0500, Nowhere Man wrote:
                                > >
                                > > I understand what you were saying. And I got it to work...
                                > It looks
                                > > pretty neat. My patch was to fix the following:
                                > >
                                > > [in vimrc: wh=999, wmh=0, noea, sb]
                                > >
                                > > vim -o file1 file2 file3 file4
                                > > :: this creates two windows and 4 buffers with the first
                                > two buffers
                                > > in the windows (in window.c/make_windows() maxcount is set
                                > to 2 since
                                > > the calculation gives a negative number).
                                > >
                                > > vim then :new file1<CR>:new file2<CR>:new file3<CR>:new file4<CR>
                                > > :: this creates four windows with a buffer in each and
                                > works as expected.
                                >
                                > I see something different, but it still looks like a
                                > bug. Instead of adding a line to my vimrc, I skipped the
                                > vimrc file and set the various options when starting vim:
                                >
                                > $ vim -N -u NONE +"set wh=999 wmh=0 noea sb" -o file1 file2
                                > file3 file4
                                >
                                > Please try it this way, just in case there is something else
                                > in your vimrc file that affects this behavior.
                                >
                                > Instead of seeing two windows and 4 buffers, I get 4 windows:
                                > three of them have one status line *and* one text line, and
                                > the fourth takes up the rest of the terminal. When I cycle
                                > to the bottom window, or
                                >
                                > :set wh=999
                                >
                                > the three small windows collapse to just a status line each.

                                Yes, same here... If the commands are issued after vim is running it behaves
                                correctly. If the commands are in vimrc, it only creates two windows.

                                Sorry for not including my version information... Vim 6.3b/Win32 (I've
                                tested this with both the packaged 6.3b and the cvs sources as of 8:00pm CDT
                                with the HUGE feature set with dynamic perl and python). The same behavior
                                is seen with vim and gvim.
                              • Nowhere Man
                                Bram: Is my patch or another fix going to make it into the source?
                                Message 15 of 21 , May 31, 2004
                                • 0 Attachment
                                  Bram:

                                  Is my patch or another fix going to make it into the source?




                                  > -----Original Message-----
                                  > From: Nowhere Man [mailto:pi-rho@...]
                                  > Sent: Saturday, May 29, 2004 12:05 AM
                                  > To: 'Benji Fisher'; vim-dev@...
                                  > Subject: RE: Tabs revisited
                                  >
                                  > > -----Original Message-----
                                  > > From: Benji Fisher [mailto:benji@...]
                                  > > Sent: Friday, May 28, 2004 10:05 PM
                                  > > To: vim-dev@...
                                  > > Subject: Re: Tabs revisited
                                  > >
                                  > > On Fri, May 28, 2004 at 04:48:37PM -0500, Nowhere Man wrote:
                                  > > >
                                  > > > I understand what you were saying. And I got it to work...
                                  > > It looks
                                  > > > pretty neat. My patch was to fix the following:
                                  > > >
                                  > > > [in vimrc: wh=999, wmh=0, noea, sb]
                                  > > >
                                  > > > vim -o file1 file2 file3 file4
                                  > > > :: this creates two windows and 4 buffers with the first
                                  > > two buffers
                                  > > > in the windows (in window.c/make_windows() maxcount is set
                                  > > to 2 since
                                  > > > the calculation gives a negative number).
                                  > > >
                                  > > > vim then :new file1<CR>:new file2<CR>:new file3<CR>:new file4<CR>
                                  > > > :: this creates four windows with a buffer in each and
                                  > > works as expected.
                                  > >
                                  > > I see something different, but it still looks like a bug.
                                  > > Instead of adding a line to my vimrc, I skipped the vimrc
                                  > file and set
                                  > > the various options when starting vim:
                                  > >
                                  > > $ vim -N -u NONE +"set wh=999 wmh=0 noea sb" -o file1 file2
                                  > > file3 file4
                                  > >
                                  > > Please try it this way, just in case there is something
                                  > else in your
                                  > > vimrc file that affects this behavior.
                                  > >
                                  > > Instead of seeing two windows and 4 buffers, I get 4 windows:
                                  > > three of them have one status line *and* one text line, and
                                  > the fourth
                                  > > takes up the rest of the terminal. When I cycle to the
                                  > bottom window,
                                  > > or
                                  > >
                                  > > :set wh=999
                                  > >
                                  > > the three small windows collapse to just a status line each.
                                  >
                                  > Yes, same here... If the commands are issued after vim is
                                  > running it behaves correctly. If the commands are in vimrc,
                                  > it only creates two windows.
                                  >
                                  > Sorry for not including my version information... Vim
                                  > 6.3b/Win32 (I've tested this with both the packaged 6.3b and
                                  > the cvs sources as of 8:00pm CDT with the HUGE feature set
                                  > with dynamic perl and python). The same behavior is seen
                                  > with vim and gvim.
                                  >
                                  >
                                • Bram Moolenaar
                                  I still didn t get your real name. ... It s not clear what problems a fix would create. I rather not change it now. -- hundred-and-one symptoms of being an
                                  Message 16 of 21 , Jun 1, 2004
                                  • 0 Attachment
                                    I still didn't get your real name.

                                    > Is my patch or another fix going to make it into the source?

                                    It's not clear what problems a fix would create. I rather not change it
                                    now.

                                    --
                                    hundred-and-one symptoms of being an internet addict:
                                    26. You check your mail. It says "no new messages." So you check it again.

                                    /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                                    /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                                    \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
                                    \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
                                  • Vince Negri
                                    There is something strange happening. if I do Benji s vim -N -u NONE + set wh=999 wmh=0 ls=2 -o file1 file2 file3 Then I get three status lines for the three
                                    Message 17 of 21 , Jun 1, 2004
                                    • 0 Attachment
                                      There is something strange happening.

                                      if I do Benji's
                                      vim -N -u NONE +"set wh=999 wmh=0 ls=2" -o file1 file2 file3

                                      Then I get three status lines for the three files.

                                      *but* if I create a _vimrc which has only the line
                                      set wh=999 wmh=0 ls=2
                                      in it, and then do

                                      vim -N -u _vimrc -o file1 file2 file3

                                      I only get status lines for file1 and file2.

                                      Surely those two commands ought to be equivalent?

                                      > -----Original Message-----
                                      > From: Benji Fisher [SMTP:benji@...]
                                      >
                                      >
                                      > I see something different, but it still looks like a bug. Instead
                                      > of adding a line to my vimrc, I skipped the vimrc file and set the
                                      > various options when starting vim:
                                      >
                                      > $ vim -N -u NONE +"set wh=999 wmh=0 noea sb" -o file1 file2 file3 file4
                                      >
                                      > Please try it this way, just in case there is something else in your
                                      > vimrc file that affects this behavior.
                                      >
                                      >
                                      Legal Disclaimer: Any views expressed by the sender of this message are
                                      not necessarily those of Application Solutions Ltd. Information in this
                                      e-mail may be confidential and is for the use of the intended recipient
                                      only, no mistake in transmission is intended to waive or compromise such
                                      privilege. Please advise the sender if you receive this e-mail by mistake.
                                    • Antony Scriven
                                      ... Maybe it s something to do with there not being a terminal present when the _vimrc is executed? au vimenter * set wh=999 wmh=0 ls=2 works fine. Antony
                                      Message 18 of 21 , Jun 1, 2004
                                      • 0 Attachment
                                        Vince Negri wrote:

                                        > There is something strange happening.
                                        >
                                        > if I do Benji's
                                        > vim -N -u NONE +"set wh=999 wmh=0 ls=2" -o file1 file2 file3
                                        >
                                        > Then I get three status lines for the three files.
                                        >
                                        > *but* if I create a _vimrc which has only the line
                                        > set wh=999 wmh=0 ls=2
                                        > in it, and then do
                                        >
                                        > vim -N -u _vimrc -o file1 file2 file3
                                        >
                                        > I only get status lines for file1 and file2.
                                        >
                                        > Surely those two commands ought to be equivalent?

                                        Maybe it's something to do with there not being a terminal
                                        present when the _vimrc is executed?

                                        au vimenter * set wh=999 wmh=0 ls=2

                                        works fine.

                                        Antony
                                      • Bram Moolenaar
                                        ... The order of execution is different. Firs the vimrc file is used, then the files are loaded, then command arguments are executed. Thus in the first
                                        Message 19 of 21 , Jun 1, 2004
                                        • 0 Attachment
                                          Vince Negri wrote:

                                          > There is something strange happening.
                                          >
                                          > if I do Benji's
                                          > vim -N -u NONE +"set wh=999 wmh=0 ls=2" -o file1 file2 file3
                                          >
                                          > Then I get three status lines for the three files.
                                          >
                                          > *but* if I create a _vimrc which has only the line
                                          > set wh=999 wmh=0 ls=2
                                          > in it, and then do
                                          >
                                          > vim -N -u _vimrc -o file1 file2 file3
                                          >
                                          > I only get status lines for file1 and file2.
                                          >
                                          > Surely those two commands ought to be equivalent?

                                          The order of execution is different. Firs the vimrc file is used, then
                                          the files are loaded, then command arguments are executed. Thus in the
                                          first example you set 'winheight' after opening the windows.

                                          That ":all" uses 'winheight' was discussed previously. It's not nice in
                                          this situation, but useful in others (e.g., to avoid you end up with 12
                                          one-line windows in a 25 line terminal).

                                          --
                                          How To Keep A Healthy Level Of Insanity:
                                          5. Put decaf in the coffee maker for 3 weeks. Once everyone has gotten
                                          over their caffeine addictions, switch to expresso.

                                          /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                                          /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                                          \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
                                          \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
                                        • Vince Negri
                                          ... Yes indeed. It s the age-old situation where an option (winheight) which was originally for one use (stopping annoyingly small windows, as in your example)
                                          Message 20 of 21 , Jun 1, 2004
                                          • 0 Attachment
                                            Bram wrote:

                                            > That ":all" uses 'winheight' was discussed previously. It's not nice in
                                            > this situation, but useful in others (e.g., to avoid you end up with 12
                                            > one-line windows in a 25 line terminal).

                                            Yes indeed. It's the age-old situation where an option
                                            (winheight) which was originally for one use (stopping
                                            annoyingly small windows, as in your example) has been
                                            creatively (ab)used to do something else - and now we've
                                            run across a corner case which reveals the underlying
                                            "hack."

                                            The tweak I set out in my previous email (changing winheight
                                            to a true soft limit) allows the "12 one-line windows"
                                            situation, and isn't 100% back compatible, so it's not
                                            really satisfactory.

                                            The only perfect solution (assuming one wants to bother
                                            creating one) is to stop winheight doing double duty,
                                            viz:

                                            Either (a) removing the need for setting winheight to
                                            a silly number by creating a new option that has the
                                            effect "I want the current window to take as much space
                                            as possible, forcing all other windows to winminheight"

                                            or (b) adding an option which specifies whether
                                            winheight is a genuinely soft limit (new behaviour) or
                                            a firm limit (old behaviour)

                                            or (c) allowing winheight to be set to a -ve value, where
                                            a negative value is like setting the +ve value but
                                            as a true soft limit (ugh, I shouldn't have even suggested that...
                                            now I feel dirty.. ;)

                                            or (d) allowing a syntax like ":set winheight=max" which
                                            acts like the option (a) above but avoids creating another
                                            option (superficially nice, but I don't think any other
                                            numerical option acts like this so it's likely to be a can
                                            of worms)

                                            Note that all of the above *are* backward compatible, which
                                            is another important consideration.


                                            Legal Disclaimer: Any views expressed by the sender of this message are
                                            not necessarily those of Application Solutions Ltd. Information in this
                                            e-mail may be confidential and is for the use of the intended recipient
                                            only, no mistake in transmission is intended to waive or compromise such
                                            privilege. Please advise the sender if you receive this e-mail by mistake.
                                          • Antoine J. Mechelynck
                                            ... I was going to say that I thought the situation outlined in the help to be the intended behaviour, but I had a crash, and by the time my computer was up
                                            Message 21 of 21 , Jun 1, 2004
                                            • 0 Attachment
                                              Vince Negri <vnegri@...> wrote:
                                              > Bram wrote:
                                              >
                                              > > That ":all" uses 'winheight' was discussed previously. It's not
                                              > > nice in this situation, but useful in others (e.g., to avoid you
                                              > > end up with 12 one-line windows in a 25 line terminal).
                                              >
                                              > Yes indeed. It's the age-old situation where an option
                                              > (winheight) which was originally for one use (stopping
                                              > annoyingly small windows, as in your example) has been
                                              > creatively (ab)used to do something else - and now we've
                                              > run across a corner case which reveals the underlying
                                              > "hack."
                                              >
                                              > The tweak I set out in my previous email (changing winheight
                                              > to a true soft limit) allows the "12 one-line windows"
                                              > situation, and isn't 100% back compatible, so it's not
                                              > really satisfactory.
                                              >
                                              > The only perfect solution (assuming one wants to bother
                                              > creating one) is to stop winheight doing double duty,
                                              > viz:
                                              >
                                              > Either (a) removing the need for setting winheight to
                                              > a silly number by creating a new option that has the
                                              > effect "I want the current window to take as much space
                                              > as possible, forcing all other windows to winminheight"
                                              >
                                              > or (b) adding an option which specifies whether
                                              > winheight is a genuinely soft limit (new behaviour) or
                                              > a firm limit (old behaviour)
                                              >
                                              > or (c) allowing winheight to be set to a -ve value, where
                                              > a negative value is like setting the +ve value but
                                              > as a true soft limit (ugh, I shouldn't have even suggested that...
                                              > now I feel dirty.. ;)
                                              >
                                              > or (d) allowing a syntax like ":set winheight=max" which
                                              > acts like the option (a) above but avoids creating another
                                              > option (superficially nice, but I don't think any other
                                              > numerical option acts like this so it's likely to be a can
                                              > of worms)
                                              >
                                              > Note that all of the above *are* backward compatible, which
                                              > is another important consideration.


                                              I was going to say that I thought the situation outlined in the help to be
                                              the "intended" behaviour, but I had a crash, and by the time my computer was
                                              up again, there had been tjis exchange between you two, which made me
                                              reconsider. Vince, I think your proposals have merit, the problem is
                                              choosing between them. And however silly it may seem, I suppose that there
                                              might some day arise a situation where having, even (let's go whole hog, and
                                              in a 50-line VGA terminal) 47 zero-line windows, one single-line window, and
                                              of course the command-line, would present some utility :-). Of course we can
                                              set wh=1, but then if one or more windows are closed, or if less than the
                                              maximum are opened to start with, there should IMO be a way to have the
                                              current one take up the slack, so to speak.

                                              At least, if the current ambiguous behaviour (which I personallt don't like,
                                              but it's not for me to decide) is to be the norm, then it should be
                                              documented, maybe even at several places, e.g. under 'wh', :all and -o.

                                              For a "true soft" behaviour of &wh, the max no. of windows is of course the
                                              integer quotient of (&lines - &ch - (&wmh < 1)) by (&wmh + 1).

                                              Best regards,
                                              Tony.
                                            Your message has been successfully submitted and would be delivered to recipients shortly.