docs: update README.md

This commit is contained in:
sxyazi
2024-02-10 16:19:47 +08:00
parent ae2000224a
commit 894efa1541

View File

@@ -1,35 +1,44 @@
# Bookmarks.yazi # bookmarks.yazi
A [Yazi](https://github.com/sxyazi/yazi) plugin that adds the basic functionality of [vi-like marks](https://neovim.io/doc/user/motion.html#mark-motions). A [Yazi](https://github.com/sxyazi/yazi) plugin that adds the basic functionality of [vi-like marks](https://neovim.io/doc/user/motion.html#mark-motions).
> [!NOTE]
> The latest main branch of Yazi is required at the moment.
https://github.com/dedukun/bookmarks.yazi/assets/25795432/9a9fe345-dd06-442e-99f1-8475ab22fad5 https://github.com/dedukun/bookmarks.yazi/assets/25795432/9a9fe345-dd06-442e-99f1-8475ab22fad5
## Installation
```sh
# Linux/macOS
git clone https://github.com/dedukun/bookmarks.yazi.git ~/.config/yazi/plugins/bookmarks.yazi
# Windows
git clone https://github.com/dedukun/bookmarks.yazi.git %AppData%\yazi\config\plugins\bookmarks.yazi
```
## Usage ## Usage
Add this to your `keymap.toml`:
```toml ```toml
[[manager.prepend_keymap]] [[manager.prepend_keymap]]
on = [ "m" ] on = [ "m" ]
exec = "plugin bookmarks --sync --args='set'" exec = "plugin bookmarks --args=save"
desc = "Set a bookmark" desc = "Save current position as a bookmark"
```
```toml
[[manager.prepend_keymap]] [[manager.prepend_keymap]]
on = [ "'" ] on = [ "'" ]
exec = "plugin bookmarks --sync --args='jump'" exec = "plugin bookmarks --args=jump"
desc = "Jump to a bookmark" desc = "Jump to a bookmark"
```
```toml
[[manager.prepend_keymap]] [[manager.prepend_keymap]]
on = [ "b", "d" ] on = [ "b", "d" ]
exec = "plugin bookmarks --sync --args='delete'" exec = "plugin bookmarks --args=delete"
desc = "Jump to a bookmark" desc = "Delete a bookmark"
```
```toml
[[manager.prepend_keymap]] [[manager.prepend_keymap]]
on = [ "b", "D" ] on = [ "b", "D" ]
exec = "plugin bookmarks --sync --args='deleteall'" exec = "plugin bookmarks --args=delete_all"
desc = "Jump to a bookmark" desc = "Delete all bookmarks"
``` ```