If I had x or more windows open in a VIM session and I wanted to quickly hide all but the active one for a moment then return the windows to the layout I had them int how would I do it?
|
In Vim 7 and later, you can use a “tab page” for this (i.e. “GUI-style” tab). You can use the
Both Once you have your new tab open, you can use |
||||
|
|
|
As far as I know, there is no way to simply switch between two different window layouts, but you can hide all other windows by issuing the command |
||||
|
|
|
I use CTRL-W _ to horizontally "push" the other windows out of the way making the current window the expand to the largest available area. Use CTRL-W | to do the same vertically. I'm sure there's probably a way to do both at once, but I haven't noticed or looked for it. Look in :help CTRL-W To restore them do CTRL-W =. One caveat though is they aren't restored to their original configuration. CTRL-W = actually re-calculates the best fit for all the windows in the screen. |
|||
|
|