Wednesday, January 1, 2014

Re: Retaining window layout

On 20:01 Tue 31 Dec , Dejan Ranisavljevic wrote:
> I have been using vim for past 2,3 years, but there are still some issues i am not able to come over.
>
> I find it really convenient to have windows managed manually. I tried buffkill for some time,
> but it doesn't work always as expected.
>
> To be more precise, lets say i am working on something, and i have 2 splits, one for editing source file,
> and one for editing test file. Often i have to open something else so i override whichever split window with new one, and when i delete that buffer i loose windows split, this is what i didn't want, i know to close window, but why does deleting a buffer has to close a window? and i haven't found how to overcome elegantly. Anyone could suggest me a good approach?
>
> Ideally i would delete that new buffer and get a previous buffer i was working on.
>
> This weird behavior also occurs to me using Nerdtree, I open new vim instance, i toggle nerdtree open a file, i bd, i still have window from that deleted buffer, but when i open file again and bd, i loose that window. And i am left with nerdtree window only.

Hi,

Christian Robinson has wrote a few small useful plugins for that:
http://christianrobinson.name/vim/
check out BufClose, BufOnly, Rename plugins. BufClose has :BufDelete and
:BufWipe commands to delete/wipe out a buffer but do not close the
window. They do not open previous buffer, but leave you with a new one,
so you can choose a buffer to load with :e or :b commands.

Regards,
Marcin

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment