I think you're misunderstanding the terminology slightly, here. Essentially, a Vim buffer is a file, so loading two files into a single buffer isn't a concept that really makes sense.
It seems from your comments that the real issue is that you don't want to have both files in the buffer list (as displayed by vim-airline) at the same time.
I don't recommend that you do this (I think it's better to just get used to the way that Vim works), but if you really want to, you can achieve this by altering the mappings you use to call the altr plugin:
function! MySwitchForward()
let b = bufnr("%")
call altr#forward()
execute "bdelete " . b
endfunction
function! MySwitchBack()
let b = bufnr("%")
call altr#back()
execute "bdelete " . b
endfunction
nmap <F2> :call MySwitchForward()<CR>
nmap <F3> :call MySwitchBack()<CR>
These mappings use altr
to switch buffers, and then delete the buffer you just switched away from.
N.B. In my testing with the a.vim
plugin, this approach didn't work well, because of the method a.vim
uses for opening the buffer. I'm pretty sure it will work with the altr plugin you are using, but if not, you will need to replace "bdelete" with "bwipeout" (although make sure you are aware of the consequences before doing so).