How to zoom one window and make it take all the space and un-zoom once finished

Hello All,

Many times I found myself working on a project that needs to open several windows at the same time for any reason, but in a moment I want to have my full attention to work on the current window and I wish if it takes the whole screen until I finish then resume to the multi-windows setup.

For that I found the zoom-window package that served me well.

You need to add the line inside the packge.el

(package! zoom-window)

And I added my keybinidng for easy access to the function window-zoom-window inside the config.el (you can use the keybinding that you like other than what I used which is SPC z z)

(map! :leader
      (:desc "Zoom window"
       "z z" #'zoom-window-zoom))

In case you need to change the command line color to highlight that you are in the zoom-window mode then add the line in the config.el (Use the color you like best. I used DarkGreen)

(custom-set-variables
 '(zoom-window-mode-line-color "DarkGreen"))

Hope this will help someone as a nice to have workflow

See the attached gif for more illustration output1

1 Like

Doom has built-in functionality for enlargening windows, you might want to check that out too! You can use SPC w o to enlargen a window and then use SPC w = to make them take equal space again.

2 Likes

Thanks For the note, I’ll try it and check it :grinning:

This is really cool. I would like to add that SPC w u (winner-undo) is probably better than SPC w =.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.