Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Unload/delete/wipe a buffer, keep its window(s), display last accessed buffer(s)
VimL
Tag: 1.0

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
plugin
README

README

This is a mirror of http://www.vim.org/scripts/script.php?script_id=1147

Basic Usage:
When you want to unload/delete/wipe a buffer, use:
  :bun/:bd/:bw to close the window as well (vim command), or
  :BUN/:BD/:BW to leave the window(s) intact (this script).
Mappings are also defined.

Detailed Description: 
This is a script to 
a) unload, delete or wipe a buffer without closing the window (or windows) 
    it was displayed in
b) in its place, display the buffer most recently used in each window 
    it was displayed in.  This selection is taken from the full list of 
    buffers ever displayed in each respective window (since vim was started)
c) allow one level of undo in case you kill a buffer then change your mind
d) allow various customisations via option variables

The inspiration for this script came from
a) my own frustration with vim's lack of this functionality
b) the description of the emacs kill-buffer command in vimtip #622
   (this script basically duplicates this command I believe,
   not sure about the undo functionality)
c) comments and many mails from Keith Roberts when the issue was 
   raised in the vim@vim.org mailing list.
Something went wrong with that request. Please try again.