How to start gVim maximized?

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.


The best way if you're concerned about cross-platform compatibility is set lines=999 columns=999. I've found it in Vim's Wiki, and despite it's not perfect, it's a best solution if you need to work on different operating systems.


Trick with:

au GUIEnter * simalt ~x

depends on Windows language.

For my Polish version works:

au GUIEnter * simalt ~s

Where s comes from Mak_s_ymalizuj.

So if ~x doesn't work press ALT+SPACE to open Window menu and check shortcut for Ma_x_imize Window menu option.