11

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
endif

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

B Layer
  • 19,834
  • 2
  • 30
  • 57
cdvv7788
  • 219
  • 2
  • 4

2 Answers2

6

Try putting

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

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

Hope
  • 161
  • 1
  • 3
2

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
Ingo
  • 986
  • 1
  • 5
  • 11
  • 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