Skip to content
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

Support closing alpha when opening a file in a new tab rather than the current buffer. #213

Open
lougreenwood opened this issue May 12, 2023 · 4 comments

Comments

@lougreenwood
Copy link

I work using tabpages as my primary organisation method, specifically using tabdrop.

This means that when I open my nvim instance I see my alpha dashboard, I then use telescope to open a file using tabdrop and a new tabpage is created with my file.

The problem is this means that the first tabpage (which contains alpha) is not automatically closed.

From what I can see, this is currently handled by the BufUnload autocmd. However, if I try adding TabNew then it doesn't work since after switching tabs there is no alpha instance in the current tab to close.

@goolord
Copy link
Owner

goolord commented Jan 9, 2024

@lougreenwood added the new config option close_on_tabnew in the branch close_on_tabnew, would you like to test? @lougreenwood

theme.config.close_on_tabnew = true

@avegancafe
Copy link

That worked for me @goolord !

@avegancafe
Copy link

@goolord on second glance, very frequently my whole vim just closes when using this feature. Do you know how to get around that?

@goolord
Copy link
Owner

goolord commented Aug 22, 2024

maybe if alpha is the only open buffer, and you open a new tab vim just closes, i guess the solution would be for alpha to ensure there is at least one buffer open before closing the new tab (unless there is a more principled way of doing this like using a different autocommand event), i'll look into it later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants