WindowLayoutManager is a Neovim plugin that provides commands to manage window layouts in a simple and efficient way.
- Equalize window sizes
- Maximize the current window
- Close all other windows, keeping the current one open
WindowLayoutManager is particularly useful when working with split windows and you need to temporarily maximize one of them for better visibility, revert it back to its original size, or close all other windows to focus on a single file.
The plugin provides three commands:
:WinEqualize
: Equalize window sizes:WinMaximize
: Maximize the current window:WinOnly
: Close all other windows, keeping the current one open
Add the following keybindings to your Neovim configuration file (e.g., init.lua
or init.vim
) to map the commands to your preferred key combinations:
vim.keymap.set('n', '<Leader>=', ':<C-u>:WinEqualize<CR>')
vim.keymap.set('n', '<Leader>o', ':<C-u>:WinMaximize<CR>')
vim.keymap.set('n', '<Leader>O', ':<C-u>:WinOnly<CR>')
This will map = to :WinEqualize, o to :WinMaximize, and O to :WinOnly.
Installation You can install WindowLayoutManager using various plugin managers. Here are some examples:
vim-plug Add the following line to your init.vim file:
Plug 'takuya-nakazawa/window-layout-manager'
And then run :PlugInstall.
dein.vim Add the following line to your init.vim file:
call dein#add('takuya-nakazawa/window-layout-manager')
And then run :call dein#install().
Vundle Add the following line to your init.vim file:
Plugin 'takuya-nakazawa/window-layout-manager'
And then run :PluginInstall.
This project is licensed under the MIT License. See the LICENSE file for more information.