I am using neovim with qt-neovim (linux arch). On gvim i could launch a maximized window with:

if has("gui_running")
    set lines 999 columns 999

That is not working now tho. I tried removing the if without success. Is there any way i can achieve that?


Try putting

call rpcnotify(0, 'Gui', 'WindowMaximized', 1)

in your ginit.vim. I haven't tested on Linux, but it works on Windows 7.

| improve this answer | |
  • 1
    This answer works on the Xubuntu LTS 18.04 GNU/Linux distribution. – Serge Stroobandt Sep 23 '18 at 23:35

The reason seems to stem from the fact that neovim sets gui_running only after your .vimrc is sourced (see here). In this discussion it is proposed to use the GUIEnter event, thus a solution could be

autocmd GUIEnter * set lines=999 columns=999
| improve this answer | |
  • 1
    Didn't work. Maybe event is not being called. – cdvv7788 Mar 21 '16 at 23:42
  • @cdvv7788 does invoking vim with --cmd 'let gui_running="y"' together with setting columns and rows inside an if using if exists('gui_running') work? – Ingo Mar 22 '16 at 19:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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