diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua index c74ef95..74062cd 100644 --- a/lua/core/autocmds.lua +++ b/lua/core/autocmds.lua @@ -11,6 +11,9 @@ vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber | setfiletype -- Don't show status line on certain windows vim.cmd [[ autocmd BufEnter,BufWinEnter,FileType,WinEnter * lua require("core.utils").hide_statusline() ]] +--auto close file exploer when quiting incase a single buffer is left +vim.cmd([[ autocmd BufEnter * if (winnr("$") == 1 && &filetype == 'nvimtree') | q | endif ]]) + -- Open a file from its last left off position -- vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]] -- File extension specific tabbing