I personally have never found the need to actually hide the other
windows, but I do always keep the current window maximised. One way to
do this is to set wh=100000, but this kills the quickfix window. If you
use the quickfix window a lot (that's the one which shows compile errors
or grep results), then I have a little function that I use. It is hugely
personalised and I am sure there are better ways to do it, but here it
is for posterity, and perhaps you can modify it to do what you want:
function! WinEnter()
if (getwinvar(0, '&buftype')=="quickfix")
return
endif
let retcmd=winnr()."wincmd w"
wincmd b
if (getwinvar(0, '&buftype')=="quickfix")
cclose
wincmd _
exec "copen"
wincmd p
let sizecmd="resize ".winheight(0)
exe retcmd
exe sizecmd
else
exe retcmd
wincmd _
endif
endfunction
au! WinEnter * call WinEnter()
set wh=1
> -----Original Message-----
> From: Steve Amerige [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 10, 2006 10:44 AM
> To: [email protected]
> Subject: Show/Hide Split Windows
>
> Hi all,
>
> The ability to split windows is an absolute essential; however, there
are
> times when I want to focus on one buffer in one window and
> hide all of the other windows. But, I don't know of any show/hide
feature
> that hides all windows but the current window. As a
> workaround, I resize all of the windows to give maximum space to the
> window I want to see, but this then makes me resize all of the
> windows again when I want to restore the windows.
>
> So, by any chance, is this a feature that is already implemented and I
> don't know of it?
>
> Or, can it be put on a wishlist? If so, here's how I imagine it could
> work:
>
> Some keystroke does the toggle for show/hide inactive windows
(non-current
> windows). Also, a statusline entry is available that can
> be used as a visible reminder that the inactive windows are hidden.
>
> Feedback?
>
> Thanks,
> Steve Amerige
> Adobe Systems Incorporated