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

Re: Gvim on Windows doesn't remember its position and size

Expand Messages
  • Ben Fritz
    ... A much better place would be the user-specific file instead of the system-wide one, which additionally could get overwritten with every new Vim install. Go
    Message 1 of 21 , Nov 2, 2011
    • 0 Attachment
      On Oct 31, 6:33 am, Walt Elam <wre...@...> wrote:
      > 2011/10/31 Дмитрий Франк <dimon.fr...@...>
      >
      > > Gvim on Windows doesn't remember its position and size.
      >
      > > I have two monitors, and Gvim always starts in the primary monitor and
      > > non-maximized. I have to everytime move it to another monitor and maximize.
      > > Other Windows applications remember its screen position and size, and start
      > > with the same parameters as it was closed.
      >
      >            You can use the following attributes in the _vimrc file located
      > in C:\Program Files\Vim:
      >

      A much better place would be the user-specific file instead of the
      system-wide one, which additionally could get overwritten with every
      new Vim install.

      Go into Vim and do :echo $HOME to see where Vim found your $HOME
      directory. Then create a file called either _vimrc or .vimrc in that
      directory.

      After you do this, you can actually refer to this file using the
      $MYVIMRC environment variable, from within Vim.

      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • Дмитрий Франк
      ... i tried to use these variables, but there s anyway some troubles. when gvim is opened in my secondary monitor and it is maximized, command :winpos
      Message 2 of 21 , Nov 2, 2011
      • 0 Attachment
                    :winpos <x-position> <y-position>     "Set the x,y position of the gVim Window when gVim starts
                    :set lines=<integer>                         "Set the number of rows that the gVim window has
                    :set columns=<integer>                    "Set the number of columns that the gVim window has

        i tried to use these variables, but there's anyway some troubles.
        when gvim is opened in my secondary monitor and it is maximized, command ":winpos" returns "-1684 -4".
        When i try to type ":winpos -1684 -4", gvim's window appears at the right place for a very little time (a part of second), and then instantly moves to main monitor, and ":winpos" returns "0 0" then. So, winpos is unfortunately unable to set negative values.

        How can i fix this?

        Thanks.

        pic.gif
         

        It could be very useful if Gvim on Windows remind it too.


        --
        You received this message from the "vim_dev" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        --
        You received this message from the "vim_dev" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        --
        You received this message from the "vim_dev" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php
      • Tony Mechelynck
        ... Hmm, IIUC Vim doesn t know about multiple monitors, or about the fact that negative coordinates might be meaningful: so when it moves or resizes the Vim
        Message 3 of 21 , Nov 3, 2011
        • 0 Attachment
          On 03/11/11 05:54, Дмитрий Франк wrote:
          >
          > :winpos <x-position> <y-position> "Set the x,y position
          > of the gVim Window when gVim starts
          > :set lines=<integer> "Set the number of rows that the
          > gVim window has
          > :set columns=<integer> "Set the number of columns that
          > the gVim window has
          >
          >
          > i tried to use these variables, but there's anyway some troubles.
          > when gvim is opened in my secondary monitor and it is maximized, command
          > ":winpos" returns "-1684 -4".
          > When i try to type ":winpos -1684 -4", gvim's window appears at the
          > right place for a very little time (a part of second), and then
          > instantly moves to main monitor, and ":winpos" returns "0 0" then. So,
          > winpos is unfortunately unable to set negative values.
          >
          > How can i fix this?
          >
          > Thanks.

          Hmm, IIUC Vim doesn't know about multiple monitors, or about the fact
          that negative coordinates might be meaningful: so when it moves or
          resizes the Vim screen (moves with :winpos, resizes by changing 'lines'
          'columns' or, in gvim, 'guifont') it will try to adjust its coordinates
          so that:

          0 <= Xmin < Xmax <= Width
          0 <= Ymin < Ymax <= Height

          where Xmin, Xmax, Ymin, Ymax refer to the Vim screen, Width and Height
          to your monitor. This will of course backfire if you try to move the Vim
          screen to a secondary monitor, especially if it is located above or to
          the left of the primary.

          You could try naming your topleftmost monitor the primary, but only
          experiment will tell if it will work.


          Best regards,
          Tony.
          --
          Fudd's First Law of Opposition:
          Push something hard enough and it will fall over.

          --
          You received this message from the "vim_dev" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php
        • Дмитрий Франк
          3 ÎÏÑÂÒÑ 2011 Ç. 11:09 ÐÏÌØÚÏ×ÁÔÅÌØ Tony Mechelynck
          Message 4 of 21 , Nov 3, 2011
          • 0 Attachment
            3 ноября 2011 г. 11:09 пользователь Tony Mechelynck <antoine.mechelynck@...> написал:
            On 03/11/11 05:54, Дмитрий Франк wrote:
            Hmm, IIUC Vim doesn't know about multiple monitors, or about the fact that negative coordinates might be meaningful: so when it moves or resizes the Vim screen (moves with :winpos, resizes by changing 'lines' 'columns' or, in gvim, 'guifont') it will try to adjust its coordinates so that:

                   0 <= Xmin < Xmax <= Width
                   0 <= Ymin < Ymax <= Height

            But could you please change this behaviour?  Personally i need to make my right monitor to be primary, and, after all, you see that negative coordinates is meaningful. Actually, even if Gvim stays in primary monitor, but it is maximized, then coordinates is "-4 -4" - it is negative again.

            Something wrong.


            where Xmin, Xmax, Ymin, Ymax refer to the Vim screen, Width and Height to your monitor. This will of course backfire if you try to move the Vim screen to a secondary monitor, especially if it is located above or to the left of the primary.

            You could try naming your topleftmost monitor the primary, but only experiment will tell if it will work.


            Best regards,
            Tony.
            --
            Fudd's First Law of Opposition:
                   Push something hard enough and it will fall over.

            --
            You received this message from the "vim_dev" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php
          • Дмитрий Франк
            3 ÎÏÑÂÒÑ 2011 Ç. 11:18 ÐÏÌØÚÏ×ÁÔÅÌØ äÍÉÔÒÉÊ æÒÁÎË ... now this isn t legal to use bang ( :winpos! ), so, maybe, the better way
            Message 5 of 21 , Nov 3, 2011
            • 0 Attachment
              3 ноября 2011 г. 11:18 пользователь Дмитрий Франк <dimon.frank@...> написал:


              3 ноября 2011 г. 11:09 пользователь Tony Mechelynck <antoine.mechelynck@...> написал:
              On 03/11/11 05:54, Дмитрий Франк wrote:
              Hmm, IIUC Vim doesn't know about multiple monitors, or about the fact that negative coordinates might be meaningful: so when it moves or resizes the Vim screen (moves with :winpos, resizes by changing 'lines' 'columns' or, in gvim, 'guifont') it will try to adjust its coordinates so that:

                     0 <= Xmin < Xmax <= Width
                     0 <= Ymin < Ymax <= Height

              But could you please change this behaviour?  Personally i need to make my right monitor to be primary, and, after all, you see that negative coordinates is meaningful. Actually, even if Gvim stays in primary monitor, but it is maximized, then coordinates is "-4 -4" - it is negative again.

              now this isn't legal to use bang  ( :winpos! ), so, maybe, the better way is to make it legal, and to not check if values is negative in this case.  
              I mean, ":winpos -4 -4" should set position to "0 0", but   ":winpos! -4 -4"    should really set position to "-4 -4"  


              Something wrong.


              where Xmin, Xmax, Ymin, Ymax refer to the Vim screen, Width and Height to your monitor. This will of course backfire if you try to move the Vim screen to a secondary monitor, especially if it is located above or to the left of the primary.

              You could try naming your topleftmost monitor the primary, but only experiment will tell if it will work.


              Best regards,
              Tony.
              --
              Fudd's First Law of Opposition:
                     Push something hard enough and it will fall over.


              --
              You received this message from the "vim_dev" maillist.
              Do not top-post! Type your reply below the text you are replying to.
              For more information, visit http://www.vim.org/maillist.php
            • Walt Elam
              2011/11/3 äÍÉÔÒÉÊ æÒÁÎË ... way? Instead of a negative value try using the equivalent positive value. Also, the y axis
              Message 6 of 21 , Nov 3, 2011
              • 0 Attachment
                2011/11/3 Дмитрий Франк <dimon.frank@...>

                            :winpos <x-position> <y-position>     "Set the x,y position of the gVim Window when gVim starts
                            :set lines=<integer>                         "Set the number of rows that the gVim window has
                            :set columns=<integer>                    "Set the number of columns that the gVim window has

                i tried to use these variables, but there's anyway some troubles.
                when gvim is opened in my secondary monitor and it is maximized, command ":winpos" returns "-1684 -4".
                When i try to type ":winpos -1684 -4", gvim's window appears at the right place for a very little time (a part of second), and then instantly moves to main monitor, and ":winpos" returns "0 0" then. So, winpos is unfortunately unable to set negative values.

                How can i fix this?

                Ah, I see your problem now. Have you tried setting winpos in the opposite way? Instead of a negative value try using the equivalent positive value. Also, the y axis origin should still be the top of the monitor so I'm not entirely sure how it is returning a negative y-value when issuing :winpos.

                Example: two monitors that are 1680x1050, and you want the position to be equivalent to :winpos -4 -4

                x: 2(1680) + <x-position>
                y: <y-position>

                so try

                :winpos 3356 -4

                Again, I'm very confused about the y-position, having a negative y-position indicates that the GVim menu bar would be slightly off of the screen which doesn't seem useful, especially by only 4 pixels.

                In addition, I just tested this on a single monitor machine and setting the x and y values higher than the resolution successfully put the GVim window off of the screen, so I'm hoping it will essentially "wrap-around" for you.
                Thanks.

                pic.gif
                 

                It could be very useful if Gvim on Windows remind it too.


                --
                You received this message from the "vim_dev" maillist.
                Do not top-post! Type your reply below the text you are replying to.
                For more information, visit http://www.vim.org/maillist.php

                --
                You received this message from the "vim_dev" maillist.
                Do not top-post! Type your reply below the text you are replying to.
                For more information, visit http://www.vim.org/maillist.php

                --
                You received this message from the "vim_dev" maillist.
                Do not top-post! Type your reply below the text you are replying to.
                For more information, visit http://www.vim.org/maillist.php

                --
                You received this message from the "vim_dev" maillist.
                Do not top-post! Type your reply below the text you are replying to.
                For more information, visit http://www.vim.org/maillist.php
              • Дмитрий Франк
                ... Hi. Unfortunately, this not helped: setting the x and y values higher than the resolution successfully really put the GVim window off of the screen, but i
                Message 7 of 21 , Nov 6, 2011
                • 0 Attachment
                  3 ноября 2011 г. 19:58 пользователь Walt Elam <wrelam@...> написал:


                  2011/11/3 Дмитрий Франк <dimon.frank@...>

                              :winpos <x-position> <y-position>     "Set the x,y position of the gVim Window when gVim starts
                              :set lines=<integer>                         "Set the number of rows that the gVim window has
                              :set columns=<integer>                    "Set the number of columns that the gVim window has

                  i tried to use these variables, but there's anyway some troubles.
                  when gvim is opened in my secondary monitor and it is maximized, command ":winpos" returns "-1684 -4".
                  When i try to type ":winpos -1684 -4", gvim's window appears at the right place for a very little time (a part of second), and then instantly moves to main monitor, and ":winpos" returns "0 0" then. So, winpos is unfortunately unable to set negative values.

                  How can i fix this?

                  Ah, I see your problem now. Have you tried setting winpos in the opposite way? Instead of a negative value try using the equivalent positive value. Also, the y axis origin should still be the top of the monitor so I'm not entirely sure how it is returning a negative y-value when issuing :winpos.

                  Example: two monitors that are 1680x1050, and you want the position to be equivalent to :winpos -4 -4

                  x: 2(1680) + <x-position>
                  y: <y-position>

                  so try

                  :winpos 3356 -4

                  Again, I'm very confused about the y-position, having a negative y-position indicates that the GVim menu bar would be slightly off of the screen which doesn't seem useful, especially by only 4 pixels.

                  In addition, I just tested this on a single monitor machine and setting the x and y values higher than the resolution successfully put the GVim window off of the screen, so I'm hoping it will essentially "wrap-around" for you.

                  Hi.

                  Unfortunately, this not helped: setting the x and y values higher than the resolution successfully really put the GVim window off of the screen, but i can't make Gvim put itself on the *left* monitor.
                  about -4 -4 : i'm sure this is Windows XP issue. When app is maximized, there's no border shown, and this border is 4 pixels width. I need to test it on Linux machine.

                  By the way, you successfully guessed: i have two monitors exactly 1680x1050 :)  and my right monitor is primary, left monitor is secondary. So, i still can't put Gvim window to the *left* monitor, because of (0; 0) point is a left-top corner of right monitor.
                   
                  Thanks.

                  pic.gif
                   

                  It could be very useful if Gvim on Windows remind it too.


                  --
                  You received this message from the "vim_dev" maillist.
                  Do not top-post! Type your reply below the text you are replying to.
                  For more information, visit http://www.vim.org/maillist.php

                  --
                  You received this message from the "vim_dev" maillist.
                  Do not top-post! Type your reply below the text you are replying to.
                  For more information, visit http://www.vim.org/maillist.php

                  --
                  You received this message from the "vim_dev" maillist.
                  Do not top-post! Type your reply below the text you are replying to.
                  For more information, visit http://www.vim.org/maillist.php

                  --
                  You received this message from the "vim_dev" maillist.
                  Do not top-post! Type your reply below the text you are replying to.
                  For more information, visit http://www.vim.org/maillist.php

                  --
                  You received this message from the "vim_dev" maillist.
                  Do not top-post! Type your reply below the text you are replying to.
                  For more information, visit http://www.vim.org/maillist.php
                • Дмитрий Франк
                  Dear Vim developers, so do you plan to allow negative values for :winpos in future? ... -- You received this message from the vim_dev maillist. Do not
                  Message 8 of 21 , Nov 13, 2011
                  • 0 Attachment
                    Dear Vim developers, so do you plan to allow negative values for :winpos in future?


                    7 ноября 2011 г. 8:42 пользователь Дмитрий Франк <dimon.frank@...> написал:

                    3 ноября 2011 г. 19:58 пользователь Walt Elam <wrelam@...> написал:



                    2011/11/3 Дмитрий Франк <dimon.frank@...>

                                :winpos <x-position> <y-position>     "Set the x,y position of the gVim Window when gVim starts
                                :set lines=<integer>                         "Set the number of rows that the gVim window has
                                :set columns=<integer>                    "Set the number of columns that the gVim window has

                    i tried to use these variables, but there's anyway some troubles.
                    when gvim is opened in my secondary monitor and it is maximized, command ":winpos" returns "-1684 -4".
                    When i try to type ":winpos -1684 -4", gvim's window appears at the right place for a very little time (a part of second), and then instantly moves to main monitor, and ":winpos" returns "0 0" then. So, winpos is unfortunately unable to set negative values.

                    How can i fix this?

                    Ah, I see your problem now. Have you tried setting winpos in the opposite way? Instead of a negative value try using the equivalent positive value. Also, the y axis origin should still be the top of the monitor so I'm not entirely sure how it is returning a negative y-value when issuing :winpos.

                    Example: two monitors that are 1680x1050, and you want the position to be equivalent to :winpos -4 -4

                    x: 2(1680) + <x-position>
                    y: <y-position>

                    so try

                    :winpos 3356 -4

                    Again, I'm very confused about the y-position, having a negative y-position indicates that the GVim menu bar would be slightly off of the screen which doesn't seem useful, especially by only 4 pixels.

                    In addition, I just tested this on a single monitor machine and setting the x and y values higher than the resolution successfully put the GVim window off of the screen, so I'm hoping it will essentially "wrap-around" for you.

                    Hi.

                    Unfortunately, this not helped: setting the x and y values higher than the resolution successfully really put the GVim window off of the screen, but i can't make Gvim put itself on the *left* monitor.
                    about -4 -4 : i'm sure this is Windows XP issue. When app is maximized, there's no border shown, and this border is 4 pixels width. I need to test it on Linux machine.

                    By the way, you successfully guessed: i have two monitors exactly 1680x1050 :)  and my right monitor is primary, left monitor is secondary. So, i still can't put Gvim window to the *left* monitor, because of (0; 0) point is a left-top corner of right monitor.
                     
                    Thanks.

                    pic.gif
                     

                    It could be very useful if Gvim on Windows remind it too.


                    --
                    You received this message from the "vim_dev" maillist.
                    Do not top-post! Type your reply below the text you are replying to.
                    For more information, visit http://www.vim.org/maillist.php

                    --
                    You received this message from the "vim_dev" maillist.
                    Do not top-post! Type your reply below the text you are replying to.
                    For more information, visit http://www.vim.org/maillist.php

                    --
                    You received this message from the "vim_dev" maillist.
                    Do not top-post! Type your reply below the text you are replying to.
                    For more information, visit http://www.vim.org/maillist.php

                    --
                    You received this message from the "vim_dev" maillist.
                    Do not top-post! Type your reply below the text you are replying to.
                    For more information, visit http://www.vim.org/maillist.php


                    --
                    You received this message from the "vim_dev" maillist.
                    Do not top-post! Type your reply below the text you are replying to.
                    For more information, visit http://www.vim.org/maillist.php
                  • Christian Brabandt
                    ... Vim doesn t care, whether the values are negative or positive. I can successfully use negative values using either the Windows built or the GTK built. What
                    Message 9 of 21 , Nov 15, 2011
                    • 0 Attachment
                      On Sun, November 13, 2011 4:43 pm, Дмитрий Франк wrote:
                      > Dear Vim developers, so do you plan to allow negative values for :winpos
                      > in future?

                      Vim doesn't care, whether the values are negative or positive. I can
                      successfully use negative values using either the Windows built or the
                      GTK built. What Gui are you using? It sounds rather like an issue with
                      your gui toolkit.

                      regards,
                      Christian

                      --
                      You received this message from the "vim_dev" maillist.
                      Do not top-post! Type your reply below the text you are replying to.
                      For more information, visit http://www.vim.org/maillist.php
                    • John Little
                      ... Er... on my gvim 7.3.353 Huge version with GTK2-GNOME GUI , negative arguments to winpos are coerced to 0, as I would expect from :h winpos: The position
                      Message 10 of 21 , Nov 15, 2011
                      • 0 Attachment
                        Christian Brabandt said:

                        > Vim doesn't care, whether the values are negative or positive. I can
                        > successfully use negative values using either the Windows built or the
                        > GTK built. What Gui are you using? It sounds rather like an issue with
                        > your gui toolkit.

                        Er... on my gvim 7.3.353 "Huge version with GTK2-GNOME GUI", negative
                        arguments to winpos are coerced to 0, as I would expect from :h
                        winpos:

                        "The position is adjusted to make the window fit on the screen (if
                        possible)."

                        I imagine the OP doesn't want this "adjustment".

                        Regards, John

                        --
                        You received this message from the "vim_dev" maillist.
                        Do not top-post! Type your reply below the text you are replying to.
                        For more information, visit http://www.vim.org/maillist.php
                      • Christian Brabandt
                        ... Seems to depend on your window manager. I don t know, why gnome would reset it back to zero. Fluxbox/Openbox don t do it and allow to set negative values
                        Message 11 of 21 , Nov 16, 2011
                        • 0 Attachment
                          On Wed, November 16, 2011 6:37 am, John Little wrote:
                          > Christian Brabandt said:
                          >
                          >> Vim doesn't care, whether the values are negative or positive. I can
                          >> successfully use negative values using either the Windows built or the
                          >> GTK built. What Gui are you using? It sounds rather like an issue with
                          >> your gui toolkit.
                          >
                          > Er... on my gvim 7.3.353 "Huge version with GTK2-GNOME GUI", negative
                          > arguments to winpos are coerced to 0, as I would expect from :h
                          > winpos:
                          >
                          > "The position is adjusted to make the window fit on the screen (if
                          > possible)."
                          >
                          > I imagine the OP doesn't want this "adjustment".

                          Seems to depend on your window manager. I don't know, why gnome
                          would reset it back to zero. Fluxbox/Openbox don't do it and allow to
                          set negative values (and so does Windows).

                          All that Vim does is calling gtk_window_move() with the new x and y
                          values and the documentation at http://developer.gnome.org/gtk/stable/
                          does not mention, that negative values are forbidden. Might be still
                          some unwanted effect in the way vim uses the gtk-toolkit.

                          regards,
                          Christian

                          --
                          You received this message from the "vim_dev" maillist.
                          Do not top-post! Type your reply below the text you are replying to.
                          For more information, visit http://www.vim.org/maillist.php
                        • Дмитрий Франк
                          15 ÎÏÑÂÒÑ 2011 Ç. 15:05 ÐÏÌØÚÏ×ÁÔÅÌØ Christian Brabandt ... I use standard Windows explorer. ... -- You received this message from the
                          Message 12 of 21 , Nov 17, 2011
                          • 0 Attachment
                            15 ноября 2011 г. 15:05 пользователь Christian Brabandt <cblists@...> написал:
                            On Sun, November 13, 2011 4:43 pm, Дмитрий Франк wrote:
                            > Dear Vim developers, so do you plan to allow negative values for :winpos
                            > in future?

                            Vim doesn't care, whether the values are negative or positive. I can
                            successfully use negative values using either the Windows built or the
                            GTK built. What Gui are you using? It sounds rather like an issue with
                            your gui toolkit.

                            I use standard Windows explorer.
                             

                            regards,
                            Christian

                            --
                            You received this message from the "vim_dev" maillist.
                            Do not top-post! Type your reply below the text you are replying to.
                            For more information, visit http://www.vim.org/maillist.php

                            --
                            You received this message from the "vim_dev" maillist.
                            Do not top-post! Type your reply below the text you are replying to.
                            For more information, visit http://www.vim.org/maillist.php
                          • Christian Brabandt
                            Hi äÍÉÔÒÉÊ! ... Please be more specific. What Windows version, what patch of vim? As I said, I could use negative values on my Windows XP system at
                            Message 13 of 21 , Nov 18, 2011
                            • 0 Attachment
                              Hi Дмитрий!

                              On Do, 17 Nov 2011, Дмитрий Франк wrote:

                              > 15 ноября 2011 г. 15:05 пользователь Christian Brabandt
                              > <cblists@...>написал:
                              >
                              > > On Sun, November 13, 2011 4:43 pm, Дмитрий Франк wrote:
                              > > > Dear Vim developers, so do you plan to allow negative values for :winpos
                              > > > in future?
                              > >
                              > > Vim doesn't care, whether the values are negative or positive. I can
                              > > successfully use negative values using either the Windows built or the
                              > > GTK built. What Gui are you using? It sounds rather like an issue with
                              > > your gui toolkit.
                              > >
                              >
                              > I use standard Windows explorer.

                              Please be more specific. What Windows version, what patch of vim? As I
                              said, I could use negative values on my Windows XP system at work, using
                              Vim 7.3.44 (or whatever the latest built from www.vim.org is).

                              regards,
                              Christian
                              --

                              --
                              You received this message from the "vim_dev" maillist.
                              Do not top-post! Type your reply below the text you are replying to.
                              For more information, visit http://www.vim.org/maillist.php
                            • Дмитрий Франк
                              Sorry that so long. I have been using Gvim 7.3 without any patches, and negative values on it wasn t work. I have installed Gvim from www.vim.org recently, and
                              Message 14 of 21 , Nov 29, 2011
                              • 0 Attachment
                                Sorry that so long.

                                I have been using Gvim 7.3 without any patches, and negative values on it wasn't work. I have installed Gvim from www.vim.org recently, and its behavior is better, but anyway doesn't work as it should work.

                                To make Gvim full-screen in my left monitor, i need to do the following:

                                1) :winpos -1684 -4
                                2) :set lines=67
                                3) :set columns=237

                                1) i do:
                                :winpos -1684 -4
                                Gvim correctly stays on the proper place.

                                2) i do:
                                :set lines=67
                                And then Gvim changes its winpos to 0 0 again!

                                So, it allows to set negative values to :winpos, but setting lines or columns resets winpos.

                                --
                                You received this message from the "vim_dev" maillist.
                                Do not top-post! Type your reply below the text you are replying to.
                                For more information, visit http://www.vim.org/maillist.php
                              • Jürgen Krämer
                                Hi, ... Whenever you set the lines or columns option to a new value GVim tries to make sure that all lines and columns are visible on the screen (at least
                                Message 15 of 21 , Nov 29, 2011
                                • 0 Attachment
                                  Hi,

                                  Дмитрий Франк wrote:
                                  > Sorry that so long.
                                  >
                                  > I have been using Gvim 7.3 without any patches, and negative values on it wasn't work. I have installed Gvim from www.vim.org <http://www.vim.org> recently, and its behavior is better, but anyway doesn't work as it should work.
                                  >
                                  > To make Gvim full-screen in my left monitor, i need to do the following:
                                  >
                                  > 1) :winpos -1684 -4
                                  > 2) :set lines=67
                                  > 3) :set columns=237
                                  >
                                  > 1) i do:
                                  > :winpos -1684 -4
                                  > Gvim correctly stays on the proper place.
                                  >
                                  > 2) i do:
                                  > :set lines=67
                                  > And then Gvim changes its winpos to 0 0 again!

                                  Whenever you set the 'lines' or 'columns' option to a new value GVim
                                  tries to make sure that all lines and columns are visible on the screen
                                  (at least this seems to be the case on Windows).

                                  > So, it allows to set negative values to :winpos, but setting lines or columns resets winpos.

                                  Just switch the order of your commands

                                  1) :set lines=67
                                  2) :set columns=237
                                  3) :winpos -1684 -4

                                  Regards,
                                  Jürgen

                                  --
                                  Sometimes I think the surest sign that intelligent life exists elsewhere
                                  in the universe is that none of it has tried to contact us. (Calvin)

                                  --
                                  You received this message from the "vim_dev" maillist.
                                  Do not top-post! Type your reply below the text you are replying to.
                                  For more information, visit http://www.vim.org/maillist.php
                                • Дмитрий Франк
                                  ... I tried to do so, but my primary monitor (this is a monitor in which Vim starts) is less than secondary, so, :set lines=67 and columns=237 will actually
                                  Message 16 of 21 , Nov 29, 2011
                                  • 0 Attachment
                                    Just switch the order of your commands

                                     1) :set lines=67
                                     2) :set columns=237
                                     3) :winpos -1684 -4

                                    Regards,
                                    Jürgen


                                    I tried to do so, but my primary monitor (this is a monitor in which Vim starts) is less than secondary, so, :set lines=67 and columns=237 will actually set less values.
                                    Could you please make a way to make Vim not to check if there enough space to show needed lines and columns count?
                                     
                                    --
                                    Sometimes I think the surest sign that intelligent life exists elsewhere
                                    in the universe is that none of it has tried to contact us.     (Calvin)

                                    --
                                    You received this message from the "vim_dev" maillist.
                                    Do not top-post! Type your reply below the text you are replying to.
                                    For more information, visit http://www.vim.org/maillist.php

                                    --
                                    You received this message from the "vim_dev" maillist.
                                    Do not top-post! Type your reply below the text you are replying to.
                                    For more information, visit http://www.vim.org/maillist.php
                                  • Jürgen Krämer
                                    ... I haven t followed the whole thread so please excuse me if you already have said it: Do you want to maximize the window on the monitor (-4 is a typical
                                    Message 17 of 21 , Nov 29, 2011
                                    • 0 Attachment
                                      Дмитрий Франк schrieb:
                                      >
                                      > Just switch the order of your commands
                                      >
                                      > 1) :set lines=67
                                      > 2) :set columns=237
                                      > 3) :winpos -1684 -4
                                      >
                                      > Regards,
                                      > Jürgen
                                      >
                                      >
                                      > I tried to do so, but my primary monitor (this is a monitor in which Vim starts) is less than secondary, so, :set lines=67 and columns=237 will actually set less values.
                                      > Could you please make a way to make Vim not to check if there enough space to show needed lines and columns count?

                                      I haven't followed the whole thread so please excuse me if you already
                                      have said it: Do you want to maximize the window on the monitor (-4 is
                                      a typical value for maximized windows on Windows)? If so you might try

                                      :winpos -1680 0
                                      :simalt ~X

                                      where you have to replace the "X" in the second command with the letter
                                      that is underlined in the "Maximize" menu item of GVim's system menu
                                      (the one in the upper left corner of the title bar).

                                      Regards,
                                      Jürgen

                                      --
                                      Sometimes I think the surest sign that intelligent life exists elsewhere
                                      in the universe is that none of it has tried to contact us. (Calvin)

                                      --
                                      You received this message from the "vim_dev" maillist.
                                      Do not top-post! Type your reply below the text you are replying to.
                                      For more information, visit http://www.vim.org/maillist.php
                                    • Дмитрий Франк
                                      2011/11/30 Jürgen Krämer ... this could be a great solution if only Windows hadn t been so stupid. Now I ll explain: I use
                                      Message 18 of 21 , Nov 29, 2011
                                      • 0 Attachment
                                        2011/11/30 Jürgen Krämer <jottkaerr@...>
                                         
                                         
                                        Дмитрий Франк schrieb:
                                        >
                                        >     Just switch the order of your commands
                                        >
                                        >      1) :set lines=67
                                        >      2) :set columns=237
                                        >      3) :winpos -1684 -4
                                        >
                                        >     Regards,
                                        >     Jürgen
                                        >
                                        >
                                        > I tried to do so, but my primary monitor (this is a monitor in which Vim starts) is less than secondary, so, :set lines=67 and columns=237 will actually set less values.
                                        > Could you please make a way to make Vim not to check if there enough space to show needed lines and columns count?

                                        I haven't followed the whole thread so please excuse me if you already
                                        have said it: Do you want to maximize the window on the monitor (-4 is
                                        a typical value for maximized windows on Windows)? If so you might try

                                         :winpos -1680 0
                                         :simalt ~X

                                        where you have to replace the "X" in the second command with the letter
                                        that is underlined in the "Maximize" menu item of GVim's system menu
                                        (the one in the upper left corner of the title bar).

                                        Regards,
                                        Jürgen


                                        this could be a great solution if only Windows hadn't been so stupid. Now I'll explain:
                                        I use cyrillic Windows, and my combination for maximize window is Alt+Spacebar+Р  (Р is a cyrillic letter).

                                        But command :simalt ~Р unfortunately works if only current layout is cyrillic! I mean that i type :simalt ~Р, and current layout is cyrillic, i press enter, and this works. Then i change layout to default english, type :<up>  (previous command appears at command-line), press enter, end, damn, it doesn't work.

                                        Maybe is there workaround in Vim to simulate Windows layout change? Or any other workaround?
                                         
                                        --
                                        Sometimes I think the surest sign that intelligent life exists elsewhere
                                        in the universe is that none of it has tried to contact us.     (Calvin)

                                        --
                                        You received this message from the "vim_dev" maillist.
                                        Do not top-post! Type your reply below the text you are replying to.
                                        For more information, visit http://www.vim.org/maillist.php

                                        --
                                        You received this message from the "vim_dev" maillist.
                                        Do not top-post! Type your reply below the text you are replying to.
                                        For more information, visit http://www.vim.org/maillist.php
                                      Your message has been successfully submitted and would be delivered to recipients shortly.