-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
[FEATURE] Properly support tab-scoped sessions #76
Comments
Hey @caenrique I think this technically already works? You'd need to remove |
Ok, I'll try to be more precise: I am using
This is not implemented right now, and even though tab sessions work in a basic level, it's kind of inconvenient to use as is. This would be awsome. Some other related things:
I am willing to help implement some things if necessary. |
I'm a bit unclear on what you mean by this; sessions are really just point in time snapshots of your current nvim state, keeping track of buffers being open and somehow associating them with particular sessions would make things much more complicated, plus one would have to somehow add handling for when one loads up another session from within another one. Overall the reason the behaviour you want is difficult to achieve is because different tab pages don't really have their own state, a session is a Neovim wide thing -- like you said, not saving tab pages is somewhat of a primitive way of achieving per tab sessions, but it won't be perfect based on how tabs, state and Neovim's mksession actually work.
This one is perfectly doable I think, there's already an example of how that's done currently in the code I'd be glad to review a PR on this! |
@caenrique so I just learned that Neovim has This is promising as it means it would be somewhat easier to support tab scoped sessions. |
I posted #189 as my use case is different. I have a single session for my project, but have lots of tabs open, each with their own working directory for sub folders inside my project. Because I work on web sites, it could be templates, sass files and javascript for example. But after reading this issue again even though the use cases are different the underlying issue and solution might be the same. As I posted there it's possible to use The way to get the setting for each is like this:
in all those cases if a more specific cwd hasn't been set then the function will return the next one up. For that reason changing the code in It would still be nice to have this as an option but I'm going to fork the project and try out this "fix" for myself and see if there are any unwanted side effects. |
Here is my fork with just This isn't in a state for me to ask you to pull it, it's a change in behaviour which might not be what some people want. Also, I'm only changing
It's also used in several places in @caenrique do you want to try this fork to see if it fixes your issue? |
Hey! Sure I'll give it a try this afternoon :) |
Hey @caenrique, did you ever get a chance to try this? |
Hey, Sorry that I didn't answer back 😅 |
Is your feature request related to a problem? Please describe.
I usually use tabs as different projects, or specific UI layouts (eg: diffview, neogit, etc) and for that I remove the
tabpages
fromsessionoptions
, but then closing the tab leaves me with a lot of buffers related to that session open, which could be closed.I know that plugins like https://github.com/xolox/vim-session#tab-scoped-sessions implement this feature, so I just thought that it would be very nice to have that as well :)
The text was updated successfully, but these errors were encountered: