use nerdtree instead

This commit is contained in:
Lee Tang
2022-04-01 17:03:25 +08:00
parent 7193c3914c
commit 0b56283159
3 changed files with 22 additions and 4 deletions

View File

@@ -0,0 +1,12 @@
local g = vim.g
local map = require('utils').map
map('n', '<leader>te', ':NERDTreeToggle<CR>')
vim.cmd([[
autocmd VimEnter * NERDTree | wincmd p
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
]])