Alex Rivera | Logout

How to maximize vim's windows on startup with .vimrc?

Asked 2012-09-16T15:31:02.863
12

Can I add something to my .vimrc or .gvimrc to make gvim always start up in a maximized GUI window?

vim
Edit
Report

1 Answer

12

It looks like if you're using Windows, it's as easy as adding this line into your .vimrc:

au GUIEnter * simalt ~x

(type :help maximize or :help win16-maximized for details)

Apparently there's no standard way to do it on other platforms from your vimrc. The simplest trick without knowing which platform is to add

set lines=999 columns=999

to your .gvimrc. There are a few other tricks that can help at the Vim Wiki's Maximize or set initial window size page.

answered 2012-09-16T15:51:12.543

Your Answer