I’m having problems setting a ‘dynamic’ window width in my .vimrc. Doing this for winheight works just fine (thanks to the Thoughtbot Art of Vim video for the starting point). 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.
UPDATE
I learned that I can avoid the error message by pre-pending :silent! in front of the command. Cool