On 19 February 2010 13:16, Christian Brabandt <[email protected]> wrote:
> 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.
>
>

Interesting. I am interested in changing font size on the fly (bad
eyes) and I just assumed that this was possible. I am new to VIM and
not had the chance to try everything yet.

On my Kubuntu 9.10 machine I tried entering the following into the command bar:
:silent let &guifont=substitute(&guifont, ':h\zs\d\+', '\=submatch(0)+1', '')

It gave  no error, but the font size did not change. Where in the vast
fine manual should I start looking for how to perform this necessary
task in Linux?

Thanks!
-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

Please CC me if you want to be sure that I read your message. I do not
read all list mail.

-- 
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Reply via email to