-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent <C-*> from going back to a deleted buffer? #12
Comments
Hey, I think #8 would be for more esoteric use cases. For your particular, however, I think :Bwipeout would do the trick: https://github.com/moll/vim-bbye#buffer-delete-vs-wipeout. Does that help? |
Yeah that works, thanks! Except ideally I'd want |
For anyone else looking for a solution, one alternative is to override function! OpenLastUsedBuffer(count) abort
let blist = map(sort(getbufinfo({'buflisted': 1}), {b1, b2 -> b2.lastused - b1.lastused}), 'v:val.bufnr')
let idx = min([len(blist)-1, a:count])
execute "buffer ".blist[idx]
endfunction
nnoremap <silent> <C-^> :<C-U>call OpenLastUsedBuffer(v:count1)<CR> (This works with |
I love this plugin, but I often find myself resurrecting deleted buffers by hitting (which I have mapped to <C-*>). Is there a way to fix this? Is #8 relevant? Thanks!
The text was updated successfully, but these errors were encountered: