Open unclechu opened 6 years ago
No, such method does not exists, but it is possible to implement
@daa84 this would be cool, to be able to control increasing/decreasing font-size from vim-code for example.
Increasing/decreasing the font size from Vimscript is possible if you don't want to change the font of open vim instances. My ginit.vim does basically that.
Doesn't solve the initial problem, but working Ctrl
+ -
/ +
/ 0
is very satisfying. :)
what good solution here? how rpc api can look like? add command for increase/decrease font size or return font description?
@daa84 I don't personally need actual 'increase' or 'decrease' functions, I could easily implement them if I could just get current font-family and font-size. You could look on my implementation for neovim-qt, it's based on global variable g:GuiFont
.
g:GuiLoaded
should probably be implemented for neovim-gtk too
Well, would it be possible to re-enable guifont
option? It works for gvim, but it seems a way more vim-nature, than weird call rpcnotify()
call (which would probably still be used in the background). Of course, it would be lovely if the option was bi-directional (so, reading the variable, so it would read the current information via mechanism discussed here).
looks like it possible to use guifont within option_set event
looks like it possible to use guifont within option_set event
I am sorry, could you show me some example how to use it? If I just run
:set guifont=Fira\ Code\ Medium\ 11
then the font used by the gui doesn't change (as it does with gvim).
no it is not implemented, this mean that it is easily can be implemented 😄
@mcepl You could look at how I personally do it: https://github.com/unclechu/neovimrc/blob/fd9160e34206bbc637de130f3a41d759942dd38c/ginit.vim#L12-L68
Is there any method to get current font configuration? Like kinda
let result = rpcrequest(1, 'Gui', 'Font')
?