Title pretty much says it all... I tried:
nvim-qt -h
nvim-qt --help
nvim-qt --width=80
nvim-qt --geom 80x120
without much success...
See also #83.
Not at the moment, working on it in an upcoming PR/issue. Stay tuned.
@equalsraf, thank you. Should we close this?
No, leave it open, it is still a valid issue to want a way to force an initial size. We need one or both of
Open issues:
I use a 24 lines, 80 characters vim and get the size in pixel or whatnot from that. But then again, I do use vertical maximise and back again a lot. Also, some code just does not fit into that (html templates come to mind) so I end up re-sizing the window via the window manager resize functionality to whatever looks good at the time. I'm a great help, ain't I⸮
Again, overall I shall be happy with whatever you implement as long as it's documented.
Errr, just realized something, --geometry seems to work already (at least in #109) maybe its default behavior in Qt/QMainWindow.
So it does... nvim-qt --geometry 500x320 ook.py seems to give me the right dimensions aka 24 rows, 80 columns. All maximized_horizontal and maximized_vertical work as expected. ☺
Now, off to find out why I get no colours in vim-airline and code highlighting whereas I do on console... ☹
Documented in http://doc.qt.io/qt-5/qguiapplication.html its also possible to set the window position, -geometry should also work.
Now, off to find out why I get no colours in vim-airline and code highlighting whereas I do on console... ☹
Did you see this for airline https://github.com/equalsraf/neovim-qt/pull/101?
No, I did not know about it. Thank you. In addition to the following:
filetype plugin indent on
syntax on
All is fine with colours.
I wanted to add to this for any Windows users that you can have the window start automatically maximized by changing the properties of the shortcut.
Properties -> Shortcut -> Run: Maximized
@AssailantLF thanks, its also possible to use --maximized now
On Windows 10 you should use -qwindowgeometry 1030x608
I cannot find an answer to this question anywhere: Trying to create an autocommand that sets the GUI width when neovim-qt starts, based on filetype. I can maximize the window, but that's pretty much not what I'm trying to do. There doesn't seem to be a way to tell the GUI how many columns wide you want it, without launching it with args. Any ideas?
I cannot find an answer to this question anywhere: Trying to create an autocommand that sets the GUI width when neovim-qt starts, based on filetype. I can maximize the window, but that's pretty much not what I'm trying to do. There doesn't seem to be a way to tell the GUI how many columns wide you want it, without launching it with args. Any ideas?
@daveman1010221 Does autocmd FileType text GuiFont! PragmataPro Nerd Font Mono:h9 works for you?
I use this to set up fonts based on machine name. Maybe that could help you too?
if IsOnSomeParticularMachine('nightwatch')
GuiFont! PragmataProMono Nerd Font:h9
else
GuiFont! PragmataPro Nerd Font Mono:h9
endif
@kierun this is a great tip, but actually I'm trying to re-size the GUI window itself, not the fonts. :-)
I cant test right now but one these should work
In columns/rows sizes there is set lines=20 or set columns=20.
There is no way to resize with pixel or screen coordinates coordinates. But in vimscript the variable v:windowid should provide you with the id of that window. In linux you could call some other tool to resize the window using that (maybe xprop or xdotool).
Most helpful comment
On Windows 10 you should use
-qwindowgeometry 1030x608