Sunday, December 20, 2009

Re: automatic lines setting?

Earler, I said:
> If I do
>
>     :set lines=500|echomsg &lines
>
> I get 500 in the message history, but with
>
>     :set lines=500|redraw|echomsg &lines
>
> I get 87.

I just tried that on windows (earlier was vim-gtk) and set lines=500|
echomsg &lines gives 76, but adding your lines code to _gvimrc doesn't
work, with or without a redraw.

:help gui suggests using the GUIEnter event. I tried:

func Autolines()
set lines=500 " over zealous numbers of lines
let &lines = ((float2nr(0.85*&lines)>52)?float2nr(0.85*&lines):52)
endfunc
autocmd GUIEnter * call Autolines()

in my _gvimrc on windows and it seemed to work, lines was set to 64.
I'll try it tomorrow on my vim-gtk on Kubuntu.

Regards, John

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

No comments: