Windows – How to set the default window size in vim

vimwindows

When I right click on a file and open it in Vim, the default window size is too small. How can I change the settings so that the default window size is bigger?

I'm running Vim 7.3.46 in Windows 7.

Best Answer

You can set the 'lines' and 'columns' options in ~/.gvimrc (~/_gvimrc on Windows). E.g:

:set lines=35 columns=150

I don't recommend you do this in your vimrc, because setting those options in console Vim can have odd effects, if it works at all; the gvimrc is only loaded when gVim is started.

Related Question