-
-
Notifications
You must be signed in to change notification settings - Fork 487
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
How to get back the old default (botright vertical) window position? #650
Comments
Take that back. Rather than revert I've just changed line: All is back to my expected behaviour.... Is this small change acceptable to the original intent of #630? |
I'll be honest in my usage the change was a Noop (the window appears in the same place as before with default settings) and I'm not sure even from your description what the actual difference in practice is. Hey @raven42 does this mean anything to you? |
The main issue is that the tagbar window now appears between splits/windows if you have several open at a time. I.e. I have 3 vertical splits/windows open with related files. I open tagbar while in the first split/window (furthest left). Now tagbar is between split 1 and 2 and I still have split 3 on the far right. If I switch between the 1st split and the furthest right (i.e. now The old behaviour was that no matter what split/window you where in when you opened tagbar it would always be on the far right of the vim screen (i.e. Quickest way to see what I mean: |
I've been able to confirm the bahavior @RoDuth has mentioned. I'll have to look into a better way to handle this then. The main purpose of #630 was to work with a window manager plugin I was developing https://github.com/raven42/devpanel-vim. With the open position using 'rightbelow' or 'leftabove', It allows the window placement how I was wanting like this:
If I change this to 'botright' and 'topleft', then I end up with this type of window positioning.
I can look at adding a more direct option using the full syntax for 'topleft' / 'botright' / 'leftabove' / 'rightbelow' with a default of 'botright' so the behavior is the same as the old default. |
Yes please, exactly what I thought. If openpos was to just equal what is set in g:tagbar_position you could have any of these arrangement options. Interesting to see your reasoning for what you wanted (tagbar under NERDTree), makes a little more sense to me now. |
Thanks for the extra explanation @RoDuth, I see the problem now too. I use both splits and tagbar extensively but don't mix and match my usage at all. I agree the default should be as you describe because having tagbar update for panes on both sides of it is confusing. It looks like @raven42 is on this for now, let me know if you need anything from me. |
* Fix for window positioning With default case having multiple vertically split windows, the tagbar window should open on the far right of the screen. When the feature in pull-request 630 was added, this behavior changed to open the tagbar window relative to the current window. This commit will fix that by allowing direct usage of the vim split options. Validated the following cases for the old default values. These all still behave the same way as prior to pull-request 630 when the tagbar is activated in the `active` window shown in the below examples: ``` " No options +-----------------------------------+ | preview | +--------+--------+--------+--------+ | edit | edit | edit | tagbar | | | active | | | +--------+--------+--------+--------+ " tagbar on left, preview above let g:tagbar_left = 1 +-----------------------------------+ | preview | +--------+--------+--------+--------+ | tagbar | edit | edit | edit | | | | active | | +--------+--------+--------+--------+ " tagbar on bottom, preview to right of tagbar let g:tagbar_vertical = 10 +--------+---------------+--------+ | edit | edit | edit | | | active | | | +-----+---------+ | | | tag | preview | | +--------+-----+---------+--------+ " tagbar on top, preview to the right of tagbar let g:tagbar_left = 1 let g:tagbar_vertical = 10 +--------+-----+---------+--------+ | edit | tag | preview | edit | | +-----+---------+ | | | edit | | | | active | | +--------+---------------+--------+ ``` New values also all validated using the following: ``` " Behaves the same as no options let g:tagbar_position = 'right' " Behaves the same as g:tagbar_left = 1 let g:tagbar_position = 'left' " Behaves the same as g:tagbar_vertical = <#> let g:tagbar_position = 'bottom' " Behaves the same as g:tagbar_left = 1 | g:tagbar_vertical = <#> let g:tagbar_position = 'top' ``` * #650 - Fix typo in doc/tagbar.txt for g:tagbar_height option
* Fix for window positioning With default case having multiple vertically split windows, the tagbar window should open on the far right of the screen. When the feature in pull-request 630 was added, this behavior changed to open the tagbar window relative to the current window. This commit will fix that by allowing direct usage of the vim split options. Validated the following cases for the old default values. These all still behave the same way as prior to pull-request 630 when the tagbar is activated in the `active` window shown in the below examples: ``` " No options +-----------------------------------+ | preview | +--------+--------+--------+--------+ | edit | edit | edit | tagbar | | | active | | | +--------+--------+--------+--------+ " tagbar on left, preview above let g:tagbar_left = 1 +-----------------------------------+ | preview | +--------+--------+--------+--------+ | tagbar | edit | edit | edit | | | | active | | +--------+--------+--------+--------+ " tagbar on bottom, preview to right of tagbar let g:tagbar_vertical = 10 +--------+---------------+--------+ | edit | edit | edit | | | active | | | +-----+---------+ | | | tag | preview | | +--------+-----+---------+--------+ " tagbar on top, preview to the right of tagbar let g:tagbar_left = 1 let g:tagbar_vertical = 10 +--------+-----+---------+--------+ | edit | tag | preview | edit | | +-----+---------+ | | | edit | | | | active | | +--------+---------------+--------+ ``` New values also all validated using the following: ``` " Behaves the same as no options let g:tagbar_position = 'right' " Behaves the same as g:tagbar_left = 1 let g:tagbar_position = 'left' " Behaves the same as g:tagbar_vertical = <#> let g:tagbar_position = 'bottom' " Behaves the same as g:tagbar_left = 1 | g:tagbar_vertical = <#> let g:tagbar_position = 'top' ``` * preservim#650 - Fix typo in doc/tagbar.txt for g:tagbar_height option
My vimscript is a little rusty so I may be missing something obvious here. Can i get my normal
botright vertical
tagbar window position back somehow?I was always happy with the default window position for tagbar and never changed it in my .vimrc. It seems to me that since #630 the default position is now
rightbelow verical
(i.e. right of the current window when opening tagbar) rather thanbotright vertical
, as it was always before, (i.e. far right of the vim window).From a quick glance at the help for
g:tagbar_position
and 4e7e199 I can't see a way to get back the original default behavior using settings in my.vimrc
. But as I said it's been a while since I looked at any vimscript so forgive me if I've missed something obvious.(For now I've reverted to before 4e7e199.)
The text was updated successfully, but these errors were encountered: