You can use an autocmd with the event VimLeave
to reset lines
and columns
before Vim closes. Add the following to your vimrc
:
augroup term_size
autocmd!
autocmd VimLeave * set columns=100|setcolumns=100 lines=30
augroup END
The autocmd is executed once when Vim is about to exit and resets colums
and lines
.
I use a autocmd-group to prevent multiple definition of the autocmd when the vimrc
is sourced multiple times (e.g. during testing Vim setup). The autocmd!
clears the group before the autocmd for VimLeave
is defined. See :help autocmd-groups
.