With Vim, you can run :mksession
to save your current session, i.e., mappings,
options, variables, current directory, tabs, windows (and their layouts),
etc. This saves all the session information into a file in the current
directory called Session.vim
(you can provide a filename to the
:mksession
command if you want to save different sessions in different files, e.g.,
:mksession django-files.vim
). Since the information is stored in a file, it will persist after a restart of the computer.
To restore your session the next time you start Vim, simply run,
:source Session.vim
or :source django-files.vim
See Vim’s help session-file
for full details.
To restore the terminal tab with the Django server, I’d simply write an
alias, function or shell script to change into the relevant directory, start
the server, etc.