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 tho. I tried removing the condition with no success.
Is there any way i can achieve that?
After restarting somehow it is reading the command, however it doesn't restrict the max size to my screen size, it creates a giant one.
if has("gui_running") is not reliable right now (see neovim/neovim#3646)
however it doesn't restrict the max size to my screen size, it creates a giant one.
This is strange, should not happen, will have a look.
Yeah, i read on some other issues that has("gui_running") is not reliable, so i tried without it too.
The problem is vimrc will likely be processed before the gui even starts, so its all a matter of timing.
Any workaround for this? Anything i can help with on this issue?
@cdvv7788 not forgotten, I've got a working command line options for this in #109, but maybe we can do something similar with a global option
leaving a comment to be notified of anything new on toggle full screen command :)
Starting to look at this on #114 (script)
Any idea what are the right semantics for this type of stuff
foreground() or actual commands?GuiMaximize vs GuiMaximizeTogglePushed something into #114
If testing directly from a source build use this for now
bin/nvim-qt -- --cmd "set rtp+=../runtime/ | runtime autoload/nvim_gui.vim"
init.vim looks like this
" We can check first if the following commands are available, but the last one is just a var anyway
if exists('g:Gui')
Guifont DejaVu Sans Mono:h15
" Starts in fullscreen, Maximized should work too (untested)
let g:GuiWindowFullScreen=1
endif
From #114 call GuiWindowMaximized(1) to set as maximized. The current state in g:GuiWindowMaximized.
@khalidchawtany for fullscreen its the same, just replace with GuiWindowFullScreen
Lovely, Thanks. :+1:
Using call GuiWindowMaximized(1) command inside nvim-qt works great. Can we also use it inside ginit.vim?
Hi @jdhao. It should work inside ginit.vim as well. Are you having issues with it?
@equalsraf It works. Thanks!
How do I go about discovering such handy commands for nvim-qt? Such as GuiFullScreen and GuiWindowMaximized? So useful to know that I can toggle inside of Vim and it works in init.vim!!
@dseeni these are described in the docs. Just call :h nvim-gui-shim.
@equalsraf,
hmm, odd.. I can't get the docs on windows 8.1 .. but clearly the commands work...speaking of which.. noob question:
Is there any advantage for me compiling it? I'm just using an executable from the releases page...
Is there any advantage for me compiling it? I'm just using an executable from the releases page...
Same as every other piece of software, you get to test the newest changes and broken bits before anyone else :D.
Most helpful comment
From #114
call GuiWindowMaximized(1)to set as maximized. The current state in g:GuiWindowMaximized.@khalidchawtany for fullscreen its the same, just replace with
GuiWindowFullScreen