You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tab title left as NvimTree_1 when file opened in new tab #1769
Opening a new file by hitting t leaves NvimTree_X as the tab title.
Currently, I use autocmd BufLeave NvimTree* wincmd l, which moves the cursor from the tree buffer when switching tabs, so that the title changes to the actual buffer I'm working on.
This doesn't work when first hitting t to open the file in a new tab.
How can I make nvimtree not show up in the tab title? It's helpful to be able to see
This is working as expected: vim shows a truncated buffer name for the focused window when &tabline is not set. In this case the focused window is nvim-tree and thus its name is shown.
How can I make nvimtree not show up in the tab title? It's helpful to be able to see
This might not be useful: the tab's title would be empty.
There are also some logical difficulties here: what happens when nvim-tree is the only window in the tab?
Suggestion: create a custom action. See :help nvim-tree-mappings and :help nvim-tree.api.node.
change focus to the window you wish to appear in the title
Activity
alex-courtis commentedon Nov 26, 2022
This is working as expected: vim shows a truncated buffer name for the focused window when
&tablineis not set. In this case the focused window is nvim-tree and thus its name is shown.This might not be useful: the tab's title would be empty.
There are also some logical difficulties here: what happens when nvim-tree is the only window in the tab?
Suggestion: create a custom action. See
:help nvim-tree-mappingsand:help nvim-tree.api.node.Api.node.open.tabfor the nodealex-courtis commentedon Nov 26, 2022
It would be fantastic if you could add your solution to the wiki Recipes page.
Moving to discussions as this is not a bug.