-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Save all named buffers when saving a workspace #201
base: master
Are you sure you want to change the base?
Conversation
Removes the restriction when saving a workspace that named buffers are readable files. Not all named buffers correspond to readable files; for example URLs (downloaded by netrw) and terminal buffers in neovim. This happens to address the closed issue vim-ctrlspace#110
Great to have other bufs saved! |
Actually I've found some problems with terminal buffers. The process ID is used to uniquely name each buffer but obviously will not be the same on session restore. It's resulting in terminal buffers being duplicated if they were visible when the session was stored. I have a couple of fixes on the way to solve it. Note that this is also partially an oversight in |
Other things to check on are any details e.g. ssh sessions, current pwd's of the terminals, etc.... |
Terminal buffer names include a process ID value which cannot be duplicated if the buffer is re-created new. To handle this a mapping is created by the session script of old names to new.
Found when the first window in a new tab shows a terminal buffer. Instead of "tabedit <name>", `:mksession` outputs a bare "tabnew" followed by "edit <name>".
The terminal buffer name encodes the starting working directory and the command line to run. I don't think vim has any way of recording all the environment variables at the time a terminal was created but some can be explicitly overridden on the command line, which will be preserved. |
Hmmm... I just tried to use your latest modified workspaces setup and it reloads the workspace with file buffers named after the terminal sessions. It names them as I loaded them, i.e. with the +cmd such as If this works on your end, perhaps some vimrc settings are diff between us? My vim version is |
Ah - I was unaware vim-8 had added an immature, optional terminal feature; I was using neovim. There must be some significant differences between the two implementations. I'm going to have to compile vim from source and experiment to see how it works. |
Hello @domsekotill , any progress on this? @jyscao, would skipping terminal buffers be an option? |
Removes the restriction when saving a workspace that named buffers are
readable files. Not all named buffers correspond to readable files;
for example URLs (downloaded by netrw) and terminal buffers in neovim.
This happens to address the closed issue
#110