I'm struggling to understand the subtle nuances of buffers.
bdelete - deletes a buffer from the buffer list, and adds it to the
top-secret unlisted buffer list.
bwipeout - the documentation says "Like "bdelete, but really delete the
buffer. . . Don't use this unless you know what you are doing".
1. Can somebody please elaborate on the difference between the two commands?
ie. under what circumstances would you say "Darn, I should have heeded
the documentation and used bdelete instead of bwipeout. But no, I
wouldn't listen...and now look at the mess I'm in."
2. Can somebody provide an example of how an unlisted buffer might be
useful?
Eg. type :ls! to see a list of buffers I deleted earlier, thus providing
a nice history of the files I worked with during this editing session.
Am I right? Any other examples?
Sincerely,
-- Dennis
The buffer marks are not lost after a bdelete, they are lost after a
bwipeout.
> ie. under what circumstances would you say "Darn, I should have heeded
> the documentation and used bdelete instead of bwipeout. But no, I
> wouldn't listen...and now look at the mess I'm in."
>
> 2. Can somebody provide an example of how an unlisted buffer might be
> useful?
Unlisted buffers are not saved by ':mksession', this is useful.
Xavier
which is an advantage if you reload the deleted buffer: e.g. no need to
reload the viminfo file in search of marks (including the latest cursor
location).
>
>
>> ie. under what circumstances would you say "Darn, I should have heeded
>> the documentation and used bdelete instead of bwipeout. But no, I
>> wouldn't listen...and now look at the mess I'm in."
>>
>> 2. Can somebody provide an example of how an unlisted buffer might be
>> useful?
>
> Unlisted buffers are not saved by ':mksession', this is useful.
>
>
> Xavier
Well, wiped-out buffers are not saved either of course (Vim has
forgotten all about them), so this can hardly be called an advantage of
deleting compared to wiping out. For that, see under §1.
Best regards,
Tony.
--
Eighty percent of air pollution comes from plants and trees.
-- Ronald Reagan, famous movie star