From 782eb2a95201a07b98be7795c93a412ec45ed1f6 Mon Sep 17 00:00:00 2001 From: Jidbo Date: Wed, 13 Apr 2022 21:45:29 +0200 Subject: [PATCH] switch auto close method of file tree --- nvim/lua/filemanager.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nvim/lua/filemanager.lua b/nvim/lua/filemanager.lua index 4042106..7dac607 100644 --- a/nvim/lua/filemanager.lua +++ b/nvim/lua/filemanager.lua @@ -76,3 +76,5 @@ require'nvim-tree'.setup { cmd = 'trash' } } + +vim.cmd("autocmd BufEnter * ++nested if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif")