Is it possible to restore the window status after the maximum window?

I always have this problem. When the windows seem too small to view the code, I will type :only maximum is the window and hide the other windows. But when editing is finished, I stop wanting to restore the previous status of the windows. Similarly, before I select one window. Is there any plugin to do this work? Or is it built in vim?

EDIT . I found a plugin called ZoomWin that can really do the job. But 0 cannot be mapped to :ZoomWin in my vim. Still don't know why. The help file says that I can use 0 to invoke Zoomvim right after installing this plugin.

+4
source share
1 answer

Perhaps you could write a script using mkview and loadview if you want to keep all this in one tab, however this is what was done for vim tabs. I suggest using the following mapping to display \0 to open the current buffer in a new tab. To close a tab, simply :q , as you would normally do, and return to the previous tab containing the desired window layout.

 :nnoremap <leader>0 :tabedit %<cr> 

Note that this mapping uses <leader> , so if you changed your clider, then the sequence would not be \0 .

+2
source

Source: https://habr.com/ru/post/1399713/


All Articles