Skip to content

window local tagbar#607

Draft
isharaka wants to merge 1 commit intopreservim:masterfrom
isharaka:window-local-tagbar
Draft

window local tagbar#607
isharaka wants to merge 1 commit intopreservim:masterfrom
isharaka:window-local-tagbar

Conversation

@isharaka
Copy link
Copy Markdown

@isharaka isharaka commented May 13, 2020

Adds a global option to allow keeping tagbar local to the window containing the buffer.

The intention is to keep the tagbar local to the current window. This change does do that. However if we move to another window while tagbar is active the tagbar will be updated to reflect the buffer in the active window.

I would like to do the following when switching windows with tagbar active (if the opted in):

  • prevent tagbar being updated when moving around windows
  • make TagbarToggle close the active tagbar and reopen it in the newly active window

I am very new to vimscript. I would appreciate some hints to be able to do that.

@isharaka isharaka marked this pull request as ready for review May 13, 2020 10:29
@alerque
Copy link
Copy Markdown
Member

alerque commented May 13, 2020

Some reason this was closed? It it isn't ready but you still plan to work on it it would be nice to track it as an open PR in Draft mode (you can convert it back using the link in the reviewer section after you open it up again).

@alerque alerque marked this pull request as draft May 13, 2020 10:51
@isharaka
Copy link
Copy Markdown
Author

Hi @alerque, This one is still open. I did open one before and unintentionally closed it.

@raven42
Copy link
Copy Markdown
Collaborator

raven42 commented Oct 29, 2020

@isharaka A little while ago there was a change made to the g:tagbar_left to use g:tagbar_position instead (#630 / #652). This allows more granular control of the window positioning so it should now be possible to make the tagbar window local to the active window by doing something like this:

let g:tagbar_position = leftabove

This should open the tagbar to the left or above of the current active window (see :h split for more details on exactly how this works). Note that this wouldn't cover the case of only updating the tagbar window when switching to other windows. It will still do that, but this should at least give you a few more options for window positioning.

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

Successfully merging this pull request may close these issues.

3 participants