Closed Iron-E closed 1 year ago
@otavioschwanck @romgrk any opinions about what the option should be? Right now it is:
require'bufferline'.setup {on_close_behavior = 'left'}
…but I'm not a fan of that. The questions we should consider are:
'left'
& 'right'
, true
& false`
string
, it might be possible to specify 'first'
or 'last'
as the close behavior. I don't see the use case, but someone might want it. boolean
feels more natural for something like mimic_browser_close
My words are failing me here. Input is appreciated!
@otavioschwanck @romgrk any opinions about what the option should be? Right now it is:
require'bufferline'.setup {on_close_behavior = 'left'}
…but I'm not a fan of that. The questions we should consider are:
- What should the name of the option be?
What should the possible values be? e.g.
'left'
&'right'
,true
& false`
- If we use a
string
, it might be possible to specify'first'
or'last'
as the close behavior. I don't see the use case, but someone might want it.- On the other hand, a
boolean
feels more natural for something likemimic_browser_close
My words are failing me here. Input is appreciated!
1/2. close_focus_left: true|false. focus_on_close: left|right
And i think the focus on left should be default (is vscode, atom, jetbrains default behaviour)
I think focus_on_close
is what I'll go with for now. Thanks for the feedback
@otavioschwanck I've implemented the 'left'
& 'right'
distinctions. I'm leaving this PR as a draft for now just because it needs some testing, and I'm waiting to see what @romgrk thinks of the option naming scheme.
Glad to hear it's working. I'll wait to change the default behavior until hearing from @romgrk, but FWIW seeing as other editors (not browsers) use focus_on_close = 'left'
I am inclined to agree with you.
(Note: I still have to document the option, but that won't matter for further discussion)
@otavioschwanck I've implemented the
'left'
&'right'
distinctions. I'm leaving this PR as a draft for now just because it needs some testing, and I'm waiting to see what @romgrk thinks of the option naming scheme.
@romgrk important here: Tested 4 editors: VSCode, helix, RubyMine and atom, every editor use the focus_on_close = 'left'
Since he seems a little busy right now, I'll go ahead and set the default since I noticed he gave his opinion before.
Once I add the docs for this option, I'll merge it.
Thanks for implementing this!
Closes #368
About
In a previous request (issue #234, PR #270), it was asked that barbar.nvim mimic the behavior of a browser when closing buffers: choose the buffer to the right of the current buffer.
Code has been added to ensure that the behavior of
:BufferClose
and:BufferDelete
never differs in the future, since they are supposed to be true synonyms.Config
To access this feature, simply do:
Todo
cc: @sarmong