Skip to content

Automatically expand width of the current window. Maximizes and restore it. And all this with nice animations!

License

Notifications You must be signed in to change notification settings

folke/windows.nvim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 

Repository files navigation

windows.nvim

  • Automatically expand width of the current window;
  • Maximizes and restores the current window.

And all this with nice animations!

2022-09-17.00-30-24.mp4

Installation and setup

This plugin requires next dependencies:

Also, if you enable animations, is recommended to set winwidth, winminwidth options to some reasonable and equal values (between 5 and 20 will be OK), and disable equalalways option.

You can install and setup windows.nvim with packer plugin manager using next snippet:

use { "anuvyklack/windows.nvim",
   requires = {
      "anuvyklack/middleclass",
      "anuvyklack/animation.nvim"
   },
   config = function()
      vim.o.winwidth = 10
      vim.o.winminwidth = 10
      vim.o.equalalways = false
      require('windows').setup()
   end
}

Configuration

Read about plugins configuration in the documentation.

Commands

  • :WindowsEnableAutowidth
    :WindowsDisableAutowidth
    :WindowsToggleAutowidth

    Enable, disable or toggle auto-width feature.

  • :WindowsMaximaze

    Maximize current window. If the window is already maximized, then restore original sizes. When go to another window while current is maximized - all original sizes would restore. If the window will be closed while being maximized, then all other windows would be equalized.

    If you want a keymap — <C-w>z is a fitting choice:

    vim.keymap.set('n', '<C-w>z', '<Cmd>WindowsMaximaze<CR>')

Proposals

If you have any proposals, what else can be done with this mechanics, you are welcome to open an issue.

About

Automatically expand width of the current window. Maximizes and restore it. And all this with nice animations!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 100.0%