Quantcast

Fixate window layout?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Fixate window layout?

lith
Hi!

When switching back from eclipse to vim, I sometimes find it (still) surprising that vim doesn't seem to provide a way to "fixate" the window layout. While I think the volatility of the window layout is an advantage when working on a small screen, it can be annoying on a big screen, where I would prefer certain windows to never change their size or position.

What are currently the best options to make certain windows stay put regardless of how the other windows on the tab page change? Does Vim8 add anything new in this respect?

Regards

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fixate window layout?

Charles E Campbell Jr
lith wrote:
> Hi!
>
> When switching back from eclipse to vim, I sometimes find it (still) surprising that vim doesn't seem to provide a way to "fixate" the window layout. While I think the volatility of the window layout is an advantage when working on a small screen, it can be annoying on a big screen, where I would prefer certain windows to never change their size or position.
>
> What are currently the best options to make certain windows stay put regardless of how the other windows on the tab page change? Does Vim8 add anything new in this respect?
>
>
Read:  :help mksession

HTH,
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fixate window layout?

lith
> Read:  :help mksession

I'm sorry I don't understand how mksession or mkview could help in this
situation.

I guess my problem description was imprecise. I don't want to maintain a
certain layout across sessions or even maintain a specific layout. I
want __certain__ windows not to change e.g. when another buffer/window
is closed, resized, split etc.

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fixate window layout?

Bram Moolenaar

> I'm sorry I don't understand how mksession or mkview could help in this
> situation.
>
> I guess my problem description was imprecise. I don't want to maintain a
> certain layout across sessions or even maintain a specific layout. I
> want __certain__ windows not to change e.g. when another buffer/window
> is closed, resized, split etc.

Try 'winfixheight' and 'winfixwidth'.

--
hundred-and-one symptoms of being an internet addict:
193. You ask your girlfriend to drive home so you can sit back with
     your PDA and download the information to your laptop

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fixate window layout?

Shawn H Corey
On Wed, 22 Mar 2017 22:55:48 +0100
Bram Moolenaar <[hidden email]> wrote:

>
> > I'm sorry I don't understand how mksession or mkview could help in
> > this situation.
> >
> > I guess my problem description was imprecise. I don't want to
> > maintain a certain layout across sessions or even maintain a
> > specific layout. I want __certain__ windows not to change e.g. when
> > another buffer/window is closed, resized, split etc.
>
> Try 'winfixheight' and 'winfixwidth'.
>

And 'winpos' for position.


--
Don't stop where the ink does.

        Shawn H Corey

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fixate window layout?

lith
2017-03-23 0:02 GMT+01:00 Shawn H Corey <[hidden email]>:
> 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.

Regards



--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fixate window layout?

Charles E Campbell Jr
lith wrote:

> 2017-03-23 0:02 GMT+01:00 Shawn H Corey <[hidden email]
> <mailto:[hidden email]>>:
>
>     > 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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fixate window layout?

Christian Brabandt
In reply to this post by lith
On Do, 23 Mär 2017, lith wrote:

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

Well don't use those commands unless you want to close those windows. I
don't see the problem here. I think the flexible layout is an advantage
compared to other applications.

Best,
Christian
--
Kaum gedacht, kaum gedacht, war der Lust ein End' gemacht.
                -- Wilhelm Hauff

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fixate window layout?

Ben Fritz
On Thursday, March 23, 2017 at 1:47:34 PM UTC-5, Christian Brabandt wrote:

> On Do, 23 Mär 2017, lith wrote:
>
> > 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.
>
> Well don't use those commands unless you want to close those windows. I
> don't see the problem here. I think the flexible layout is an advantage
> compared to other applications.
>
To get an empty buffer, use :enew. To return to a previous buffer use CTRL-6 in normal mode.

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Loading...