Description
I use vim's sessions quite a lot, and this is one big disadvantage that I see in my testing of vim-plugin-viewdoc: The help file opened by it does not survive session save and restore. This disadvantage does not exist for vim help documentation opened using inbuilt :help
command. User can detect the filetype upon restoring a session and make it behave exactly as if it was opened using :help
and not opened as a file with :e <path_to_file>
(which does not guarantee jumps to work for all references).
There are multiple ways to go about creating a perception that vim-plugin-viewdoc's buffer survives across sessions.
At the very least, it would be good to know 2 things:
- Full path of file that is actually open at the time of exiting vim.
- A way of knowing that current buffer is a vim-plugin-viewdoc buffer,
&filetype
correctly says "help". Trying to do a regex match on file name\[Doc[0-9]+\]
does not look the cleanest.
I think this would be sufficient for users who care about making vim-plugin-viewdoc's buffers survive across sessions.
AND perhaps you could add full support by using SessionLoadPost
auto command to iterate over buffers and convert them to respective vim-plugin-viewdoc buffers & give users a new global variable to enable/disable that functionality.