I want to do the following:
- open 9 files in vim, (3 x 3 configuration), example files 1,2,…9. each file should take same space to display
- select a file to view, example file 3
- when I select file 3, I want to resize so that this file takes up nearly all the available space, so that i can read it easily
- similarly, I enter a command, so that the files are back to same sized views
- when I select any other file, example 6, then that file should again take up all available space.
The point I’m making is that I know how to select a file (type CTRLww to cycle through files) and if I enter a resize command, example :res +20 etc, then that file is shown bigger, then I should do :res -20 to come back to equal views, then tab to another file and repeat the two commands etc, but that is looking clumsy, and I will have to experiment with the number in the res argument. I’m guessing there is a more convenient way to hide all other files, show them back, tab to another file, and repeat the procedure?
If you always want that 3×3 grid open you could just
:tabe %when you’re in the window that you want maximized, then just close out of that tab (by typing :q) when you’re done with it. This is really the primary use of tabs, to have different arrangements of windows visible at the same time.