Neovim-qt: Fullscreen on windows?

Created on 30 Oct 2017  路  14Comments  路  Source: equalsraf/neovim-qt

Hi,
I managed to get fullscreen to work by writing:
call GuiWindowFullScreen(1)

which was fine, but I wanted to bind it to f11, and have f11 so it toggles the fullscreen state.

Unfortunately, I couldn't find any documentation, and couldn't find a variable that detects whether its fullscreen.

I had a similar issue with trying to set the guifont - I tried saying:
let g:GUIfont = Consolas:h14

But this does nothing. I can change it by saying: call Guifont.

Most helpful comment

(g:GuiWindowFullScreen + 1) % 2)

馃槃

Ok closing then.

BTW if you feel that the ergonomics are really lacking we can add some vimscript to the shim plugin.

All 14 comments

the current state should be in g:GuiWindowFullscreen

I had a similar issue with trying to set the guifont - I tried saying:
let g:GUIfont = Consolas:h14

Correct, there is no way to trigger an elaborate command on variable change.

there is no way to trigger an elaborate command on variable change

Could use dictwatcheradd('g:', 'GUIfont', ...). But would be better if we restored the 'guifont' option in core.

Well, I managed to get it working by (I feel dirty) installing a plugin, vim-fullscreen, then telling that plugin to call GuiWindowFullScreen. Which made me feel even more dirty, as I've basically installed a plugin just so I can make a toggle work.

I then discovered that you can put the font in ginit.vim. So yeah, a lot of user error on my part.

I use this in ginit.vim to toggle full screen.

nnoremap <silent> <c-w>f :call GuiWindowFullScreen((g:GuiWindowFullScreen + 1) % 2)<cr>

Maybe it will work for you too

That works! Thanks!

(g:GuiWindowFullScreen + 1) % 2)

馃槃

Ok closing then.

BTW if you feel that the ergonomics are really lacking we can add some vimscript to the shim plugin.

I don't think the ergonomics are lacking, but it is a little difficult to find information - again, could be user error, but I ended up reading the source to find what the relevant functions were. I don't think there's an entry in the help about it.

I don't think there's an entry in the help about it.

There is :h g:GuiWindowFullscreen. Or in general :h nvim-gui-shim

I don't have either entry. Just tried both to double check. Maybe this is a windows specific problem?

Possible. But I cannot check right now.

How did you install nvim-qt? Did you use the zip from the releases page, or are you using the version installed with the neovim build?

Do the rest of the nvim docs work?

Its very strange that the docs would be missing. The gui shim plugin is running, otherwise commands like GuiFont could not work. And the docs should be installed with it.

If you use dein or similar plugin managers, when there is duplicate help tag the help tag generation fails and the doces will be missing yet the plugins work as expected. Try to regenrate the helptags and see if any error pops up

I think the problem is:
I'm using nvim-qt bundled with the main nvim. I have only the documentation for the main nvim. I probably did something funny in the installation, or, there is something funny going on with the nvim zip. I've just downloaded the latest release again so I can have a look.

Nothing funny going on. IIRC I did not include the shim doc with nvim zip because I don't want these features to become expected.

:D ok then, @nowakf you can check the docs in https://github.com/equalsraf/neovim-qt/blob/master/src/gui/runtime/doc/nvim_gui_shim.txt

If you really want the docs locally you can also use the shim like a regular vim plugin

Plug 'equalsraf/neovim-gui-shim'
Was this page helpful?
0 / 5 - 0 ratings