Hi Teemu!
On Fr, 19 Feb 2010, Teemu Likonen wrote:
> * 2010-02-19 11:04 (+0200), Dotan Cohen wrote:
>
> > Depending on what I am editing, I sometimes prefer a fixed-width font
> > and other tiems a proportional font. My previous editor, Kate (KDE
> > Advanced Text Editor) lets the user change the font on the fly. Can
> > VIM do this, or is playing with the config file (thus requiring a
> > restart) the only way?
>
> Unfortunately proportional fonts don't work that well in Vim but at
> least changing font interactively is easy:
>
> set guifont=*
>
> You can set a certain font by using font name instead of "*".
Yes and you can even manipulate the setting on the fly. For example I
have this in my .vimrc:
if has("gui_running") && (has("win32") || has("win64"))
nnoremap <C-Up> :silent let &guifont=substitute(&guifont, ':h\zs\d\+',
'\=submatch(0)+1', '')<CR>
nnoremap <C-Down> :silent let &guifont=substitute(&guifont, ':h\zs\d\+',
'\=submatch(0)-1', '')<CR>
endif
which allows to increase/decrease my font size by using Ctrl+Up/Down.
This only works for Windows, as other guis have possibly a different
value for the option guifont, therefore this is wrapped into the test
for Windows and a running GUI.
regards,
Christian
--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php