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

editor.bufferline = "multiple" should be default #5316

Closed
goyalyashpal opened this issue Dec 27, 2022 · 13 comments
Closed

editor.bufferline = "multiple" should be default #5316

goyalyashpal opened this issue Dec 27, 2022 · 13 comments

Comments

@goyalyashpal
Copy link
Contributor

goyalyashpal commented Dec 27, 2022

It could be nice to have an option that, similarly to some other editors, only shows the bufferline when there is more than one buffer to display in it.

That seems like good default behavior without needing a config option.

- @ sudo rm rf bin at #2759 (comment)

  • i came here to say exactly that, multiple should be default?!
  • i'd be interested in posting a pr for this if that's wanted

Reference:

  • | `bufferline` | Renders a line at the top of the editor displaying open buffers. Can be `always`, `never` or `multiple` (only shown if more than one buffer is in use) | `never` |
  • Front-end facing site: [editor] Section
Key Description Default
bufferline Renders a line at the top of the editor displaying
open buffers. Can be alwaysnever or 
multiple (only shown if more than one buffer is in use)
never
@univerz
Copy link

univerz commented Dec 29, 2022

#2759 (comment)

@goyalyashpal
Copy link
Contributor Author

goyalyashpal commented Dec 31, 2022

it encourages the wrong workflow (treat views == tabs), it's just a less featureful version of space+b buffer list
I understand people are used to sublime/vscode-like tabs.

@ archseer at #2759 (comment)

  • so, helix doesn't have tabs then?

other than that:

  • i have seen at least one more TUI editor which had tabs feature enabled (iirc, by default)...
  • yeah, it was micro : ^T New Tab :
    wezterm-gui_vGFw6DI3oP
  • forget sublime/vscode, even the Turbo-C had tabs iirc

@the-mikedavis
Copy link
Member

Tabs are covered in #2295. The bufferline is a way to display all currently open buffers but tabs allow you to have different sets of open buffers.

@goyalyashpal
Copy link
Contributor Author

as i am not much proficient in helix at the moment, i am closing this for the moment.

if i still feel its need after i become good in helix, then i'll reopen.

meanwhile, if someone else wants to reopen this, feel free.

@goyalyashpal goyalyashpal closed this as not planned Won't fix, can't repro, duplicate, stale Dec 31, 2022
@goyalyashpal
Copy link
Contributor Author

goyalyashpal commented Feb 2, 2023

ohwww, so, buffers corresponding to unsave files are discarded automatically on going to some other buffer???

like i was in a buffer? i opened a new buffer via say :tutor, then i gp to go to previous buffer... the [scratch] buffer corresponding to tutor is now gone...

is that expected?

@goyalyashpal
Copy link
Contributor Author

i retried, and no, the previous buffer is staying there.

but i am sure it was getting dumped...

i am thinking it is a bug. but can't reproduce it consistently

@goyalyashpal
Copy link
Contributor Author

i think it's the unmodified buffer that gets dropped...

unmodified.buffer.getting.dropped.in.helix.wezterm-gui_4CmjhewISQ.mp4

@goyalyashpal
Copy link
Contributor Author

This #5257 might help me understand difference between buffers and tabs a bit more

@gabydd
Copy link
Member

gabydd commented Feb 2, 2023

Some definition first a buffer is the underlying representation of a file(which is called a document in the code), there is one buffer per file which but there can be multiple different windows(views in code) which are the vsplits and hsplits, these can look at the same buffer and lets you have different positions and selections for the same file

This thing though is specific to the scratch buffers where if they haven't been edited they get removed when you switch the buffer in the window to a buffer that is not the unmodified scratch buffer, the tutor is basically a special scratch buffer and as you didn't modify it, it got removed when switching to a different buffer.

@sgon00
Copy link

sgon00 commented Feb 6, 2023

+1

editor.bufferline = "multiple" should be default

It took me a day to figure this out and set "multiple" in the config file. What's the point to keep "never" as default if most people will set it to "multiple" anyway? Time wasted.

@goyalyashpal
Copy link
Contributor Author

hi @sgon00
yes, to us newcomers to helix, bufferlines seem to be like tabs. But they are not... see the just above well documentation by @ gabydd in how buffers work - clearly u won't expect that to happen with tabs, right 😃. This is also mentioned by @ archseer in the comment which i am quoting below.

it encourages the wrong workflow (treat views == tabs), it's just a less featureful version of space+b buffer list. But I understand people are used to tabs.

- @ archseer at #2759 (comment)
- @ univerz at #5316 (comment)

@sgon00
Copy link

sgon00 commented Feb 7, 2023

Hi @yashpalgoyal1304
Thank you very much for your reply, but I completely disagree with you. Who cares about the differences btw buffers and tabs? At least, I don't care. Whatever you call it, I just want to see an opened editors/tabs/buffers, that's all. If they are different, that's fine. As an end user, I don't care. When I take a picture with a phone, all I care is the result of the picture and I don't care what the model of the phone camera is as an end user. Developers suggest to use SPACE+b, regardless that is two buttons action, I want to see them all the time. SPACE+b will not show them all the time, but bufferline = "multiple" can. That's the difference. I don't care what model of camera inside my phone is, all I care is the picture result is good. All I want is a list on the top, I don't care what that list is called and what that list is.

hi @sgon00 yes, to us newcomers to helix, bufferlines seem to be like tabs. But they are not... see the just above well documentation by @ gabydd in how buffers work - clearly u won't expect that to happen with tabs, right smiley. This is also mentioned by @ archseer in the comment which i am quoting below.

it encourages the wrong workflow (treat views == tabs), it's just a less featureful version of space+b buffer list. But I understand people are used to tabs.

@goyalyashpal
Copy link
Contributor Author

goyalyashpal commented Feb 7, 2023

yes, it's perfectly fine. I don't care about it either haha 😃

the thing is, the tab feature is not there yet. when the tabs will arrive, sure we can have discussions on having the tab bar enabled on multiple by default.

devs have a point of not enabling the buffer bar by default - as if it's enabled by default, they'll have to see users like you and me complaining about buffers not working well etc. etc... and they'll have to clarify it again and again.

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

5 participants