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

How to redraw the whole vim screen after splitting new windows?

Expand Messages
  • Clark J. Wang
    For window-related autocmds I only found WinEnter and WinLeave. Any idea? --~--~---------~--~----~------------~-------~--~----~ You received this message from
    Message 1 of 10 , Mar 27, 2009
    • 0 Attachment
      For window-related autocmds I only found WinEnter and WinLeave. Any
      idea?
      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Tim Chase
      ... I m not sure I follow what you want...you can redraw the screen at any time with control+L, but it has nothing to do with when you split windows. Vim
      Message 2 of 10 , Mar 27, 2009
      • 0 Attachment
        Clark J. Wang wrote:
        > For window-related autocmds I only found WinEnter and WinLeave. Any
        > idea?

        I'm not sure I follow what you want...you can redraw the screen
        at any time with control+L, but it has nothing to do with when
        you split windows. Vim generally does a good job of maintaining
        its own display so control+L to repaint the screen isn't often
        needed. However, I end up using it most when I've got some
        background task running on my console, and it dumps output atop
        my foreground vim session (browsers started from the console are
        notorious for dumping such messages on my machine).

        What are you trying to do that involves splits and redraws?

        -tim



        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Sylvain Viart
        Hi, ... What about ... cleared first. Useful to update the screen halfway executing a script or function. Also when halfway a mapping and lazyredraw is set.
        Message 3 of 10 , Mar 27, 2009
        • 0 Attachment
          Hi,


          Tim Chase a écrit :
          > Clark J. Wang wrote:
          >
          >> For window-related autocmds I only found WinEnter and WinLeave. Any
          >> idea?
          >>
          What about


          :redr[aw][!] Redraw the screen right now. When ! is included it is
          cleared first.
          Useful to update the screen halfway executing a script
          or function. Also when halfway a mapping and
          'lazyredraw' is set.


          Hope that helps,
          Sylvain.


          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Clark J. Wang
          ... I included %{winnr()} in the var `statusline . But sometimes when I splitted new windows the winnr() string on screen was not updated (try :vsplit and then
          Message 4 of 10 , Mar 27, 2009
          • 0 Attachment
            On Mar 27, 6:42 pm, Tim Chase <v...@...> wrote:
            >
            > What are you trying to do that involves splits and redraws?
            >
            > -tim
            I included %{winnr()} in the var `statusline'. But sometimes when I
            splitted new windows the winnr() string on screen was not updated
            (try :vsplit and then :split). So I want to call `redraw' when I split
            new windows but I failed to find an autocmd for that.
            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Clark J. Wang
            ... Any idea? --~--~---------~--~----~------------~-------~--~----~ You received this message from the vim_use maillist. For more information, visit
            Message 5 of 10 , Mar 29, 2009
            • 0 Attachment
              On Mar 27, 7:16 pm, "Clark J. Wang" <dearv...@...> wrote:
              > On Mar 27, 6:42 pm, Tim Chase <v...@...> wrote:
              >
              > > What are you trying to do that involves splits and redraws?
              >
              > > -tim
              >
              > I included %{winnr()} in the var `statusline'. But sometimes when I
              > splitted new windows the winnr() string on screen was not updated
              > (try :vsplit and then :split). So I want to call `redraw' when I split
              > new windows but I failed to find an autocmd for that.
              Any idea?
              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_use" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • Charles Campbell
              ... Hello: I don t see any problems with %{winnr()}. I m normally use a rather more involved statusline setting than just %{winnr()}, but with just ... the
              Message 6 of 10 , Mar 30, 2009
              • 0 Attachment
                Clark J. Wang wrote:
                > On Mar 27, 7:16 pm, "Clark J. Wang" <dearv...@...> wrote:
                >
                >> On Mar 27, 6:42 pm, Tim Chase <v...@...> wrote:
                >>
                >>
                >>> What are you trying to do that involves splits and redraws?
                >>>
                >>> -tim
                >>>
                >> I included %{winnr()} in the var `statusline'. But sometimes when I
                >> splitted new windows the winnr() string on screen was not updated
                >> (try :vsplit and then :split). So I want to call `redraw' when I split
                >> new windows but I failed to find an autocmd for that.
                >>
                > Any idea?
                >

                Hello:

                I don't see any problems with %{winnr()}. I'm normally use a rather
                more involved statusline setting than just %{winnr()}, but with just

                :set stl=%{winnr()}
                :vsplit
                :split

                the window numbers are all updated properly. I then used:

                vim -u NONE -N
                :set nocp
                :filetype plugin on
                :set stl=%{winnr()}
                :vsplit
                :split

                and, again, all the window numbers are updated properly (without
                recourse to ctrl-l or :redraw).

                So: please give a detailed sequence of commands that causes a lack of
                updated status line(s), preferably using vim -u NONE -N to avoid any
                entanglements with your current .vimrc settings.

                Regards,
                Chip Campbell



                --~--~---------~--~----~------------~-------~--~----~
                You received this message from the "vim_use" maillist.
                For more information, visit http://www.vim.org/maillist.php
                -~----------~----~----~----~------~----~------~--~---
              • Clark J. Wang
                On Mar 30, 10:38 pm, Charles Campbell ... The following steps can reproduce the issue for vim 7.2.69: vim -u NONE -N ... I
                Message 7 of 10 , Mar 31, 2009
                • 0 Attachment
                  On Mar 30, 10:38 pm, Charles Campbell <Charles.E.Campb...@...>
                  wrote:
                  > Clark J. Wang wrote:
                  > > On Mar 27, 7:16 pm, "Clark J. Wang" <dearv...@...> wrote:
                  >
                  > >> I included %{winnr()} in the var `statusline'. But sometimes when I
                  > >> splitted new windows the winnr() string on screen was not updated
                  > >> (try :vsplit and then :split). So I want to call `redraw' when I split
                  > >> new windows but I failed to find an autocmd for that.
                  >
                  > > Any idea?
                  >
                  > Hello:
                  >
                  > I don't see any problems with %{winnr()}.  I'm normally use a rather
                  > more involved statusline setting than just %{winnr()}, but with just
                  >
                  >   :set stl=%{winnr()}
                  >   :vsplit
                  >   :split
                  >
                  > the window numbers are all updated properly.  I then used:
                  >
                  >   vim -u NONE -N
                  >   :set nocp
                  >   :filetype plugin on
                  >   :set stl=%{winnr()}
                  >   :vsplit
                  >   :split
                  >
                  > and, again, all the window numbers are  updated properly (without
                  > recourse to ctrl-l or :redraw).
                  >
                  > So: please give a detailed sequence of commands that causes a lack of
                  > updated status line(s), preferably using  vim -u NONE -N to avoid any
                  > entanglements with your current .vimrc settings.
                  >
                  > Regards,
                  > Chip Campbell

                  The following steps can reproduce the issue for vim 7.2.69:

                  vim -u NONE -N
                  :set laststatus=2
                  :set statusline=%{winnr()}
                  :vsplit
                  :split

                  I tested with an old vim-6.3.30 on Fedora 3 but it worked fine so
                  different versions of vim behave differently.
                  --~--~---------~--~----~------------~-------~--~----~
                  You received this message from the "vim_use" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                  -~----------~----~----~----~------~----~------~--~---
                • John Little
                  ... I see this (two windows with status line set to 2 ) with 7.2.141 and 7.1.314. I noticed that to see the problem, the :split has to be in window 1. My
                  Message 8 of 10 , Mar 31, 2009
                  • 0 Attachment
                    > The following steps can reproduce the issue for vim 7.2.69:
                    >
                    > vim -u NONE -N
                    > :set laststatus=2
                    > :set statusline=%{winnr()}
                    > :vsplit
                    > :split

                    I see this (two windows with status line set to "2") with 7.2.141 and
                    7.1.314.

                    I noticed that to see the problem, the :split has to be in window 1.
                    My .vimrc has set splitright, which puts the cursor in window 2; if I
                    move it back, then :split, then it happens. A redraw fixes it.

                    Regards, John

                    --~--~---------~--~----~------------~-------~--~----~
                    You received this message from the "vim_use" maillist.
                    For more information, visit http://www.vim.org/maillist.php
                    -~----------~----~----~----~------~----~------~--~---
                  • Charles Campbell
                    ... Hello! I see this problem in 7.2.148 -- and so I ve sent a copy of the problem along with how to reproduce it to Bram. Regards, Chip Campbell
                    Message 9 of 10 , Mar 31, 2009
                    • 0 Attachment
                      Clark J. Wang wrote:
                      > The following steps can reproduce the issue for vim 7.2.69:
                      >
                      > vim -u NONE -N
                      > :set laststatus=2
                      > :set statusline=%{winnr()}
                      > :vsplit
                      > :split
                      >
                      > I tested with an old vim-6.3.30 on Fedora 3 but it worked fine so
                      > different versions of vim behave differently.
                      >
                      Hello!

                      I see this problem in 7.2.148 -- and so I've sent a copy of the problem
                      along with
                      how to reproduce it to Bram.

                      Regards,
                      Chip Campbell


                      --~--~---------~--~----~------------~-------~--~----~
                      You received this message from the "vim_use" maillist.
                      For more information, visit http://www.vim.org/maillist.php
                      -~----------~----~----~----~------~----~------~--~---
                    • Tony Mechelynck
                      ... I can reproduce this on Vim 7.2.148. After the steps mentioned, three windows are visible, like this ... with the following numbers displayed: left (top)
                      Message 10 of 10 , Apr 1, 2009
                      • 0 Attachment
                        On 31/03/09 12:42, Clark J. Wang wrote:
                        >
                        > On Mar 30, 10:38 pm, Charles Campbell<Charles.E.Campb...@...>
                        > wrote:
                        >> Clark J. Wang wrote:
                        >>> On Mar 27, 7:16 pm, "Clark J. Wang"<dearv...@...> wrote:
                        >>
                        >>>> I included %{winnr()} in the var `statusline'. But sometimes when I
                        >>>> splitted new windows the winnr() string on screen was not updated
                        >>>> (try :vsplit and then :split). So I want to call `redraw' when I split
                        >>>> new windows but I failed to find an autocmd for that.
                        >>
                        >>> Any idea?
                        >>
                        >> Hello:
                        >>
                        >> I don't see any problems with %{winnr()}. I'm normally use a rather
                        >> more involved statusline setting than just %{winnr()}, but with just
                        >>
                        >> :set stl=%{winnr()}
                        >> :vsplit
                        >> :split
                        >>
                        >> the window numbers are all updated properly. I then used:
                        >>
                        >> vim -u NONE -N
                        >> :set nocp
                        >> :filetype plugin on
                        >> :set stl=%{winnr()}
                        >> :vsplit
                        >> :split
                        >>
                        >> and, again, all the window numbers are updated properly (without
                        >> recourse to ctrl-l or :redraw).
                        >>
                        >> So: please give a detailed sequence of commands that causes a lack of
                        >> updated status line(s), preferably using vim -u NONE -N to avoid any
                        >> entanglements with your current .vimrc settings.
                        >>
                        >> Regards,
                        >> Chip Campbell
                        >
                        > The following steps can reproduce the issue for vim 7.2.69:
                        >
                        > vim -u NONE -N
                        > :set laststatus=2
                        > :set statusline=%{winnr()}
                        > :vsplit
                        > :split
                        >
                        > I tested with an old vim-6.3.30 on Fedora 3 but it worked fine so
                        > different versions of vim behave differently.

                        I can reproduce this on Vim 7.2.148. After the steps mentioned, three
                        windows are visible, like this

                        ----------------------------
                        | | |
                        | | |
                        | | |
                        | | |
                        |-------------| |
                        | | |
                        | | |
                        | | |
                        | | |
                        ----------------------------

                        with the following numbers displayed: left (top) 1, left (bottom) 2,
                        right 2. After hitting Ctrl-L, the right-side windows gets number 3.

                        This is a GUI-enabled (GTK2/Gnome2) Huge build, and I see the same bug
                        in both Console and GUI modes, but not if I reverse the order of the
                        ":vsplit" and ":split" commands.

                        ":set nocp" is not necessary, since that's the purpose of the -N switch.
                        With or without --noplugin makes no difference.


                        Best regards,
                        Tony.
                        --
                        If I traveled to the end of the rainbow
                        As Dame Fortune did intend,
                        Murphy would be there to tell me
                        The pot's at the other end.
                        -- Bert Whitney

                        --~--~---------~--~----~------------~-------~--~----~
                        You received this message from the "vim_use" maillist.
                        For more information, visit http://www.vim.org/maillist.php
                        -~----------~----~----~----~------~----~------~--~---
                      Your message has been successfully submitted and would be delivered to recipients shortly.