Reputation: 4937
I'm having problems setting a 'dynamic' window width in my .vimrc. Doing this for winheight works just fine. Here's the code:
" dynamic current window sizing from TBot Art of Vim
set winheight=9
set winminheight=9
let &winheight = &lines - 9
set winwidth=40
set winminwidth=40 " E36 Not enough room here
let &winwidth = &columns - 40
The winheight settings work just great; but the winwidth settings get the error.
However, it all works once I'm in vim; I usually have 3-7 related windows open in a single tab and the dynamic resizing means I always have lots of space horizontally and vertically to work in.
Upvotes: 1
Views: 1442
Reputation: 172520
I can reproduce this, and tried to work around it via :autocmd VimEnter
and other such tricks, but failed.
If it all works out in the end, you can simply suppress the error by prepending :silent!
to the command.
Upvotes: 1