up vote 7 down vote favorite
3
share [g+] share [fb]

How to make gVim automatically maximize it's window when I open it? And a cross-plataform solution, I'm trying to use the same configs in a Linux and Windows machine...

I've tried the hack :set lines=999 columns=999, it almost works, but the window is not maximized, just resized and I lose some rows/columns.

link|improve this question

3  
That's the most portable way I know. Could you elaborate on the "but the window is not maximized, just resized and I lose some rows/columns". Maximization is afaik, resizing till the edges. And I don't think I ever lost a row/col in that way. – ldigas May 12 '10 at 19:04
@Idigas: correct, maximization is just "resize till it fills up available space (not covering toolbars etc)", in terms of wm-speak :) – akira May 13 '10 at 7:39
Setting the hack above doesn't resize till the edges. I'm starting to think the better approach is going to add an if in my vimrc: if it'd windows, call a config, else, call other config. – Somebody still uses you MS-DOS May 13 '10 at 12:15
feedback

4 Answers

From the Vim wiki:

au GUIEnter * simalt ~x

That'll work on Windows; I'm not sure what key combinations you'd need on Gnome/KDE.

link|improve this answer
This didn't work for me on Windows 7 Ultimate. – mattalexx Feb 18 '11 at 20:01
It also depends on the OS language sadly. For French Windows versions, it becomes au GUIEnter * simalt ~n. – ereOn Sep 7 '11 at 11:52
feedback

You can use maximize.dll plugin for fullscreen veiw on Vim (if you are using Windows). Just copy maximize.dll into vimdirectory/plugin folder.

link|improve this answer
feedback
up vote 0 down vote accepted

The best way if you're concerned about cross-plataform is using :set lines=999 columns=999. I've found it in Vim's Wiki, wasn't so satisfied about it, buy if cross-plataform is a must, them this the solution.

link|improve this answer
Can you combine this with au GUIEnter * simalt ~x ?? – snitzr Jun 9 '10 at 1:34
Yes, creating a condition in your vimrc to know if it's windows or Linux. Since I'm mainly using Linux, I'm going to add this config later. – Somebody still uses you MS-DOS Jun 9 '10 at 12:22
feedback

For me, :simalt ~x did the trick. (Windows 7, English.)

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.