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

Missing 'winfixwidth' option

Expand Messages
  • Hari Krishna Dara
    I use the nowinfixheight a lot to temporarily disable a window from participating in the automatic resizes done by Vim (such as while using ^W=). I created a
    Message 1 of 5 , Jan 31, 2006
    • 0 Attachment
      I use the 'nowinfixheight' a lot to temporarily disable a window from
      participating in the automatic resizes done by Vim (such as while using
      ^W=). I created a toggle command for this:

      nnoremap \wfh :let &l:winfixheight=(&l:winfixheight? 0 : 1)<CR>:echo
      'winfixheight='.&l:winfixheight<CR>

      Just now, I needed to do the same for a vertically split window, and was
      surprised that there is no equivalent 'winfixwidth' option. Can anyone
      explain why such an option is not useful?

      As a workaround, I moved it out of the way using ^WK command (along
      with 'nowinfixheight', of course).

      --
      Thank you,
      Hari

      __________________________________________________
      Do You Yahoo!?
      Tired of spam? Yahoo! Mail has the best spam protection around
      http://mail.yahoo.com
    • Benji Fisher
      ... I cannot answer the question, but I think I can simplify the ... HTH --Benji Fisher
      Message 2 of 5 , Jan 31, 2006
      • 0 Attachment
        On Tue, Jan 31, 2006 at 06:07:27PM -0800, Hari Krishna Dara wrote:
        >
        > I use the 'nowinfixheight' a lot to temporarily disable a window from
        > participating in the automatic resizes done by Vim (such as while using
        > ^W=). I created a toggle command for this:
        >
        > nnoremap \wfh :let &l:winfixheight=(&l:winfixheight? 0 : 1)<CR>:echo
        > 'winfixheight='.&l:winfixheight<CR>
        >
        > Just now, I needed to do the same for a vertically split window, and was
        > surprised that there is no equivalent 'winfixwidth' option. Can anyone
        > explain why such an option is not useful?
        >
        > As a workaround, I moved it out of the way using ^WK command (along
        > with 'nowinfixheight', of course).

        I cannot answer the question, but I think I can simplify the
        mapping:

        :nnoremap \wfh :setl winfixheight!<CR>:echo 'winfixheight='.&l:winfixheight<CR>

        HTH --Benji Fisher
      • thomas scott urban
        ... It s in the todo list. I looked at what it would take to implement the option not to long ago, but didn t have time to go very far. My hope was that more
        Message 3 of 5 , Jan 31, 2006
        • 0 Attachment
          On Tue, 2006-01-31 at 18:07 -0800, Hari Krishna Dara wrote:
          > I use the 'nowinfixheight' a lot to temporarily disable a window from
          > participating in the automatic resizes done by Vim (such as while using
          > ^W=). I created a toggle command for this
          >
          > nnoremap \wfh :let &l:winfixheight=(&l:winfixheight? 0 : 1)<CR>:echo
          > 'winfixheight='.&l:winfixheight<CR>
          >
          > Just now, I needed to do the same for a vertically split window, and was
          > surprised that there is no equivalent 'winfixwidth' option. Can anyone
          > explain why such an option is not useful?

          It's in the todo list. I looked at what it would take to implement the
          option not to long ago, but didn't have time to go very far. My hope
          was that more of the code for handling horizontal v. vertical sizing
          things would be symmetric (or even the same code), but it wasn't. This
          is probably due to the fact that the horizontal splits were here first,
          and you can even compile a version of vim with horizontal but not
          vertical split support (a lot of code and preproc directives to support
          this last thing, I would not think very many people would choose to
          build vim like this. I could be wrong).

          I would find the winfixwidth functionality useful, obviously.



          Scott
        • Hari Krishna Dara
          ... winfixheight= .&l:winfixheight ... Thanks for the simplification, it didn t occur to me. -- Thanks, Hari
          Message 4 of 5 , Feb 1, 2006
          • 0 Attachment
            On Wed, 1 Feb 2006 at 12:27am, Benji Fisher wrote:

            > On Tue, Jan 31, 2006 at 06:07:27PM -0800, Hari Krishna Dara wrote:
            > >
            > > I use the 'nowinfixheight' a lot to temporarily disable a window from
            > > participating in the automatic resizes done by Vim (such as while using
            > > ^W=). I created a toggle command for this:
            > >
            > > nnoremap \wfh :let &l:winfixheight=(&l:winfixheight? 0 : 1)<CR>:echo
            > > 'winfixheight='.&l:winfixheight<CR>
            > >
            > > Just now, I needed to do the same for a vertically split window, and was
            > > surprised that there is no equivalent 'winfixwidth' option. Can anyone
            > > explain why such an option is not useful?
            > >
            > > As a workaround, I moved it out of the way using ^WK command (along
            > > with 'nowinfixheight', of course).
            >
            > I cannot answer the question, but I think I can simplify the
            > mapping:
            >
            > :nnoremap \wfh :setl winfixheight!<CR>:echo
            'winfixheight='.&l:winfixheight<CR>
            >
            > HTH --Benji Fisher
            >
            >

            Thanks for the simplification, it didn't occur to me.

            --
            Thanks,
            Hari

            __________________________________________________
            Do You Yahoo!?
            Tired of spam? Yahoo! Mail has the best spam protection around
            http://mail.yahoo.com
          • Hari Krishna Dara
            ... I hope it somehow gets into vim7. -- Thanks, Hari __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the
            Message 5 of 5 , Feb 1, 2006
            • 0 Attachment
              On Tue, 31 Jan 2006 at 9:53pm, thomas scott urban wrote:

              >
              > On Tue, 2006-01-31 at 18:07 -0800, Hari Krishna Dara wrote:
              > > I use the 'nowinfixheight' a lot to temporarily disable a window from
              > > participating in the automatic resizes done by Vim (such as while using
              > > ^W=). I created a toggle command for this
              > >
              > > nnoremap \wfh :let &l:winfixheight=(&l:winfixheight? 0 : 1)<CR>:echo
              > > 'winfixheight='.&l:winfixheight<CR>
              > >
              > > Just now, I needed to do the same for a vertically split window, and was
              > > surprised that there is no equivalent 'winfixwidth' option. Can anyone
              > > explain why such an option is not useful?
              >
              > It's in the todo list. I looked at what it would take to implement the
              > option not to long ago, but didn't have time to go very far. My hope
              > was that more of the code for handling horizontal v. vertical sizing
              > things would be symmetric (or even the same code), but it wasn't. This
              > is probably due to the fact that the horizontal splits were here first,
              > and you can even compile a version of vim with horizontal but not
              > vertical split support (a lot of code and preproc directives to support
              > this last thing, I would not think very many people would choose to
              > build vim like this. I could be wrong).
              >
              > I would find the winfixwidth functionality useful, obviously.
              >

              I hope it somehow gets into vim7.

              --
              Thanks,
              Hari

              __________________________________________________
              Do You Yahoo!?
              Tired of spam? Yahoo! Mail has the best spam protection around
              http://mail.yahoo.com
            Your message has been successfully submitted and would be delivered to recipients shortly.