gnvim icon indicating copy to clipboard operation
gnvim copied to clipboard

Support GUI font requester

Open dbarnett opened this issue 6 years ago • 4 comments

On some platforms you can execute

:set guifont=*

to bring up a font requester dialog and interactively pick your font. Screenshot: image

Could GNvim implement that font requester option for set guifont=*?

dbarnett avatar Aug 19 '19 16:08 dbarnett

We could add that feature in theory, but I’m not sure if it’s something we want to add. It depends on how much we’re willing to stray from the keyboard-centric, Vim feeling. Such a feature, while convenient for some, may make GNvim’s overall UI a bit inconsistent. ATM GNvim is more of an enhanced Neovim, as opposed to what one would consider a traditional GUI text editor; this feature could change that, which may or may not be desired.

An alternative would be to open a keyboard-centric interface when the user enters set guifont=* (maybe like Startify’s) within GNvim which would allow the user to choose these font-related options. However, this would be more difficult, and likely outside the scope of GNvim (although a GNvim-specific plugin for this is an option).

All that being said, this feature is a convenience which I think we should look into; I’m not sure what route we want to take though, so some discussion is probably a good idea. @vhakulinen @badosu what do you think?

smolck avatar Aug 19 '19 17:08 smolck

:browse {cmd} exists already in n/vim for some commands. We could maybe add some event so that

:browse set

gives UIs a chance to handle it.

justinmk avatar Aug 19 '19 18:08 justinmk

Though :set guifont=* is already forwarded as-is by nvim core, i e option_set["guifont", "*"], so a GUI could handle it like gvim if it wants to.

bfredl avatar Aug 19 '19 19:08 bfredl

I did have the idea of opening gui font selector on :set guifont=*, but forgot that at some point. Shouldn't be too hard to implement either.

vhakulinen avatar Aug 26 '19 17:08 vhakulinen