Wednesday, October 27, 2010

RE: Deleting buffer and going to next

Martin Braun wrote:
> I was wondering if there's a way to concoct a command to
>
> - Delete the current buffer and
> - Move to the next
>
> without destroying my split layout.

If you use ':set hidden', and you do not actually need to delete
the current buffer (just close its window), you could use:

http://vim.wikia.com/wiki/Deleting_a_buffer_without_closing_the_window

> I guess what I really want to do is first move to the next
> buffer, and then delete the previous one (which is no longer
> displayed). However, I can't figure out a way to reference
> the previous buffer.

You can delete the alternate buffer with

:bd #

but the "alternate" won't always be what you want.

John

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: