On Thu, Aug 10, 2006 at 02:42:57PM EDT, Rodolfo Borges wrote: > On 8/10/06, Charles E Campbell Jr <[EMAIL PROTECTED]> wrote: > >Type ctrl-w o to toggle between maximizing one window and restoring > >to all. By maximizing, I mean that the current > >window will take over the entire display, not leaving a lot of status > >bars around. > > Actually, Ctrl-w o will close all other windows. > You can't get back to them using Ctrl-w o again > Immediately went to check that. How stupid of me not to have tried it, I thought. Well unfortunately all I got was an error - Ye already have only one window.
Question: Could this be scripted -- using the error code from the failed C-O attempt to "restore" the previous layout? 1. When in split mode: . Vim saves screen layout -- size, position, etc. . Vim hides all buffers save the current one . Vim maked the current buffer stretch to occupy entire window 2. When not in split mode: . Vim checks whether there's is a "previous" split mode . If so, Vim restores the previous layout . If not, displays error message Would be very cool, afaic ..save me having to look for and then memorize yet another mapping. :-) I use :unhide N but it's usually a pain restoring the layout via C-W + {H/J/K/L} and then having to resize the sub-windows. But then, I'm no unhide master. Thanks, cga.