Skip to content

MasouShizuka/close-and-restore-tab.yazi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

close-and-restore-tab.yazi

A Yazi plugin that adds the functionality to close and restore tab.

Features

  • Close the tab, and go to the left/right tab
  • Restore the closed tab to its previous position

Installation

ya pkg add MasouShizuka/close-and-restore-tab

or

# Windows
git clone https://github.com/MasouShizuka/close-and-restore-tab.yazi.git %AppData%\yazi\config\plugins\close-and-restore-tab.yazi

# Linux/macOS
git clone https://github.com/MasouShizuka/close-and-restore-tab.yazi.git ~/.config/yazi/plugins/close-and-restore-tab.yazi

Configuration

Add this to your keymap.toml:

[[manager.prepend_keymap]]
on = [ "<C-w>" ]
run = "plugin close-and-restore-tab close_to_left"
desc = "Close the current tab and turn to left tab, or quit if it is last tab"

[[manager.prepend_keymap]]
on = [ "<C-w>" ]
run = "plugin close-and-restore-tab close_to_right"
desc = "Close the current tab and turn to right tab, or quit if it is last tab"

[[manager.prepend_keymap]]
on = [ "<C-t>" ]
run = "plugin close-and-restore-tab restore"
desc = "Restore the closed tab"

close_to_left and close_to_right respectively mean switching to the left/right tab after closing the tab. Please choose the one you like.

About

A Yazi plugin that adds the functionality to close and restore tab.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages