VIM and NERD Tree – closing a buffer properly December 2, 2023 by Tarik Try this mapping: nnoremap <leader>q :bp<cr>:bd #<cr>