
A Neovim plugin to dynamically resize panes, focusing on the active window and excluding NvimTree and floating windows.
Pane Resizer is a Neovim plugin that dynamically resizes windows to optimize workspace layout. It focuses on enhancing your workflow by giving priority to the active pane, while preserving the width of excluded windows such as NvimTree
, floating windows, or buffers you've explicitly disabled from resizing.
- Smart Pane Resizing: Automatically resizes the focused window to a user-defined percentage of available space.
- Fixed Width for NvimTree: Keeps
NvimTree
at a constant width even when focus changes. - Floating Window Exclusion: Skips floating windows from layout calculations.
- Per-Buffer Resize Control: Disable resizing for any buffer on demand while preserving its current width.
- Fully Configurable: Customize widths, behavior, and activation dynamically.
- 🧠 Focus-centric layout: Maintain a clean visual hierarchy by resizing only what matters.
- ⚙️ Custom per-buffer behavior: Need a terminal or outline to keep its size? No problem.
- �� Floating support: Avoid breaking UI popups like Telescope or LSP dialogs.
- 🧩 Plug-and-play: Minimal setup and works out of the box with most setups.
-- Lazy setup
{
"mboyov/pane-resizer.nvim",
config = function()
require("pane_resizer").setup({
NVIMTREE_WIDTH = 40, -- Optional: fixed width for NvimTree (default: 30)
FOCUSED_WIDTH_PERCENTAGE = 0.6, -- Optional: focused window width (default: 0.7)
})
end,
}
Command | Description |
---|---|
:PaneResizerToggle |
Enable or disable automatic resizing globally. |
:PaneResizerDisable |
Disable resizing for the current buffer and freeze its current width. |
:PaneResizerEnable |
Re-enable resizing for the current buffer. |
- Developers using multiple vertical splits who want the focused pane to be emphasized.
- Users with sidebars (e.g.,
NvimTree
,Outline
,Trouble
) who want consistent widths. - Terminal lovers who want their REPL pane to keep its size during window navigation.
- Tinkerers looking for full control over window layout behavior.
Contributions are welcome! Feel free to open an issue or submit a pull request to improve functionality or performance.
Distributed under the MIT License. See LICENSE
for more details.
- Neovim for building an editor made to be extended.
- The amazing Neovim community for their plugins, examples, and ideas.