Is there anything I can put in my _vimrc for gVim to make the window open a certain width/height?

1 Answer 1


I would use:

if has('gui_running')
  set columns=80
  set lines=20
  • 2
    If doing so for gvim, use the gvimrc. Otherwise this affects non-gvim too
    – D. Ben Knoble
    Commented Mar 4 at 20:10
  • 2
    ... or wrap in a if has('gui_running') block.
    – Friedrich
    Commented Mar 4 at 20:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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