lith wrote:
> 2017-03-23 0:02 GMT+01:00 Shawn H Corey <shawnhcorey@gmail.com
> <mailto:shawnhcorey@gmail.com>>:
>
> > Try 'winfixheight' and 'winfixwidth'.
> >
>
> And 'winpos' for position.
>
>
> Maybe I didn't make myself clear. With "window" I refer to windows in
> vim, not the frame of the gui window.
>
> When I execute the following:
>
> e foo
> vsplit bar
> windo setl winfixheight winfixwidth
>
> I end up with a tabpage with two vertically split windows.
>
> The commands `wincmd c`, `bdelete` will remove the split and I end up
> with a single vim window. Neither winfixheight nor winfixwidth
> protected me from this. But I'd rather expect/want the other window to
> not change at all and the current window be displaying a new empty
> buffer -- or the previous buffer if any.
>
> I know that there are some vim tips (i personally use vimtip 1078) &
> code snippets around that can replace `wincmd c` or `bdelete` and
> won't change the layout but this doesn't keep plugins from changing
> the layout.
>
>
Try http://www.drchip.org/astronaut/vim/index.html#KWBD. Use :Kwbd
instead of :q . If you want :wq, then use :w prior to calling :Kwbd.
(kill window and buffer delete). You may want to use maps to have :wq
and :q actually use :Kwbd instead.
:Kwbd will use enew to make a new but empty buffer in the stead of the
window's prior contents.
Regards,
Chip Campbell
--
--
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/d/optout.
No comments:
Post a Comment