Tab title left as NvimTree_1 when file opened in new tab #1774
Replies: 3 comments 3 replies
-
This is working as expected: vim shows a truncated buffer name for the focused window when
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
|
Beta Was this translation helpful? Give feedback.
-
It would be fantastic if you could add your solution to the wiki Recipes page. Moving to discussions as this is not a bug. |
Beta Was this translation helpful? Give feedback.
-
local swap_then_open_tab = function()
local node = lib.get_node_at_cursor()
vim.cmd("wincmd l")
api.node.open.tab(node)
end
-- { key = "t", action = "swap_then_open_tab", action_cb = swap_then_open_tab }, This did the trick for me ^^ |
Beta Was this translation helpful? Give feedback.
-
Description
2022-11-22.17-55-57.mp4
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
Neovim version
Operating system and version
Linux sarah-pc 5.10.43.3-microsoft-standard-WSL2 #1 SMP Wed Jun 16 23:47:55 UTC 2021 x86_64 GNU/Linux
nvim-tree version
68a2a09
Minimal config
Steps to reproduce
<CR>
t
Expected behavior
The tab with the first file opened should contain the name of the opened file.
Actual behavior
The tab title contains
NvimTree_1
Beta Was this translation helpful? Give feedback.
All reactions