Does anyone know how to close a buffer in VIM when using NERDTree without messing up all your windows? NERD Tree normally breaks up your display into two vertical windows (the browser on your left, and then your main window on the right). If you close a buffer, then you are reduced to one giant file browsing window. If you select another file, then it opens up a second window but separating it horizontally. Any ideas?
Try this mapping: nnoremap <leader>q :bp<cr>:bd #<cr>