With vim and vim-airline, I've got a situation where I want to be able to close a buffer if it exist, and if not close vim.
So I've first remmapped :x
to ;x
for speed reasons.
nnoremap : ;
Then I mapped ;x
to close the buffers opened with vim-airline
nnoremap :x :bp <BAR> bd #<CR>
Now the issue is when I finally close all the buffers, I can't use ;x
to quit vim.
Is there any way to check if a buffer exist in vim-airline and close it? Saw this post but its more for NERDTree.