Wikia

Vim Tips Wiki

Script:2931

1,623pages on
this wiki
Talk0

Use this page to discuss script 2931 fontzoom: fontsize controller in gvim

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on vim.org).
  • This page may be out of date: check the script's vim.org page above, and its release notes.

CommentsEdit

Great plugin! I like the mouse wheel zoom control.

To make fontzoom plugin work, I first had to set the font from the menu, each time I started a new seaaon with gvim. After that &guifont was no longer empty, and fontzoom worked. Adding this to the plugin, makes it work without a trip to the font menu:

if &guifont == ''
  let &guifont = "Monospace 10"
endif

This may not have the same effect for others, I'm on a Ubuntu Linux distribution. It would be nicer to query the default, but I not aware of how to do that. --January 27, 2013

It's probably better to set the font wanted in your vimrc, in which case 'guifont' would be set. The way to set an option like this to its default value is with :set guifont&vim, however that is not useful in this case because the default is an empty string (Vim cannot reasonably know what font is available). JohnBeckett (talk) 03:49, January 29, 2013 (UTC)
You can query the font attribute using a synIDattr() call, e.g. :echo synIDattr(hlID('Normal'), 'font') Chrisbra (talk) 15:50, January 29, 2013 (UTC)
There is also the getfontname() function. I don't know if it offers anything over synIDattr or not. --Fritzophrenic (talk) 22:40, January 29, 2013 (UTC)

Around Wikia's network

Random Wiki