Saturday, December 19, 2009

Re: automatic lines setting?

Mathieu wrote:
> Here the first few lines of my .gvimrc:
>
> $ head .gvimrc
> set lines=500 " over zelous numbers of lines
> let &lines = ((float2nr(0.85*&lines)>52)?float2nr(0.85*&lines):52)
>
> set columns=85
> " double the size of window if running diff
> if &diff
> let &columns = ((&columns * 2 > 160)? 160: &columns*2)
> endif
>
> I wanted gvim to use 85% of the height of the screen or 52 lines,
> whichever is greater. If I issue the first two commands by hand after
> gvim has open. It will do what I want it to do. Why don't it work as
> part of .gvimrc?

From eval.txt line 665
You should always put a space before the ':', otherwise it can be
mistaken for use in a variable such as "a:1".

Does that help?
--
Bill
Santa Cruz, California

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

No comments: