I find ivy's virtual buffers feature ((setq ivy-use-virtual-buffers t)
) very handy for navigating to files whose buffers have been closed. Like ido's virtual buffers,it uses recentf to present those files as if their buffers were still open when switching buffers.
However, occasionally I want to remove clutter from ivy-switch-buffer by removing 'virtual buffers'. ido has C-k
, which does what I want. I've found that ivy's kill action does not always work for this purpose.
How can I reliably remove virtual buffers from the ivy-switch-buffer list, preferably using ivy itself?
C-k
does in ido I guess :-) I'm not 100% sure exactly what that is because I'm not 100% sure I know all of the state it uses: certainly recentf is part of that state, so I'm guessing that it just removes that file from therecentf
history.ido-kill-buffer-at-head
which will kill the buffer or, in the case of virtual buffers, delete it fromrecentf-list
.