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

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
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.
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
3 ноября 2011 г. 11:09 пользователь Tony Mechelynck <antoine.m...@gmail.com> написал:
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 <= HeightBut 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.
: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 hasi 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?
2011/11/3 Дмитрий Франк <dimon...@gmail.com>: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 hasi 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 -4x: 2(1680) + <x-position>y: <y-position>so try:winpos 3356 -4Again, 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.
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
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
On Sun, November 13, 2011 4:43 pm, Дмитрий Франк wrote:Vim doesn't care, whether the values are negative or positive. I can
> Dear Vim developers, so do you plan to allow negative values for :winpos
> in future?
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
On Do, 17 Nov 2011, Дмитрий Франк wrote:
> 15 ноября 2011 г. 15:05 пользователь Christian Brabandt
> <cbl...@256bit.org>написал:
>
> > 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
--
Дмитрий Франк 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)
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)
Дмитрий Франк 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
Дмитрий Франк schrieb:
>I haven't followed the whole thread so please excuse me if you already
> 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?
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)