Skip to content

Undo/Redo for window layout, save your time for `split`

License

Notifications You must be signed in to change notification settings

hek14/layman.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Note

This plugin requires nvim 0.10 or nvim nightly to work.

Motivation

Sometimes there will be multiple splits opened.

With this plugin, the window layout in neovim will be managed automatically.

Save your time to recover your favorite layout by SaveLayout/RestoreLayout.

Usage

commands

SaveLayout: record the current layout

RestoreLayout: restore your saved layout

LastLayout: go back to the last layout

keymaps

Default keymap:

<leader>ws -> SaveLayout

<leader>wr -> RestoreLayout

<leader>wl -> LastLayout

You can customize it by:

  require("layman").setup({
    keymap = {
      last = "<C-w>l", -- change it to whatever you like
      save = "<C-w>s", -- change it to whatever you like
      restore = "<C-w>r", -- change it to whatever you like
    }
  })

Limitation

  • handle floating windows
  • handle buffer that don't have attached file

About

Undo/Redo for window layout, save your time for `split`

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages