I have a little function I'm trying to fix. I'd like to change my terminal Vim window size using the ASCII escape sequence
\e[8;40;130t so that my writing window size stays the same when I use a plugin like Tagbar.
printf '\e[8;40;130t' works within the terminal (iTerm2 with Disable session-initiated window resizing unchecked in the profile preference). But the same command, issued through Vim using
exec system("printf '\e[8;40;130t'") doesn't work.
Here's the full function:
" 'F8' toggle Tagbar side-window tag browser let g:is_tagbar=0 function AdjustWindowWidth() exec 'TagbarToggle' if (g:is_tagbar==0) let g:is_tagbar=1 call system("printf '\e[8;40;130t'") else let g:is_tagbar=0 call system("printf '\e[8;40;100t'") endif endfunction noremap <F8> :exec AdjustWindowWidth()<CR>
Does anyone have a suggestion on how to fix the issue?