I'm just new to vim script, and I want to make gvim width auto adjust when open/close vimfiler or tagbar window.
here's my not working vim script:
let g:window_raw_width = 90
let g:window_width = g:window_raw_width
function adjust_tagbar_width()
if (g:window_width == g:window_raw_width)
g:window_width = g:window_raw_width + 40
else
g:window_width = g:window_raw_width
endif
set lines=g:window_width
endfunction
nmap <F9> :TagbarToggle<cr>
autocmd VimEnter,BufNewFile,BufRead * nested :TagbarToggle<cr>
please help me.