feat: add function save_last_and_quit

This commit is contained in:
MasouShizuka
2024-05-04 02:18:51 +08:00
parent 6694bc5bdb
commit 096765c489
2 changed files with 24 additions and 1 deletions

View File

@@ -55,6 +55,15 @@ run = "plugin projects --args=delete_all"
desc = "Delete all projects"
```
If you want to save the last project when exiting, map the default `quit` key to:
```toml
[[manager.prepend_keymap]]
on = [ "q" ]
run = "plugin projects --args=quit"
desc = "Save last project and exit the process"
```
---
Additionally there are configurations that can be done using the plugin's `setup` function in Yazi's `init.lua`, i.e. `~/.config/yazi/init.lua`.