There is no easy way to get the functionality you are looking to store in a register, although there is built-in support for saving the current session for a file.
:mks[ession][!] [file]
:help mksession
Suppose you are editing, and this is the end of the day. You want to quit work and pick up where you left off the next day.
You can do this by saving the editing session and restoring it the next day. A Vim session contains all the information about what you are editing.
This includes things like a list of files, a window layout, global variables, options, and other information.
...
*:mks* *:mksession* :mks[ession][!] [file] Write a Vim script that restores the current editing session. When [!] is included an existing file is overwritten. When [file] is omitted "Session.vim" is used.
Additional documentation
source share