Add fg.yazi plugin
This commit is contained in:
55
config/yazi/plugins/fg.yazi/README.md
Normal file
55
config/yazi/plugins/fg.yazi/README.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# fg.yazi
|
||||
|
||||
https://github.com/DreamMaoMao/fg.yazi/assets/30348075/4b34ff25-800f-4250-b109-172f12a8b0ce
|
||||
|
||||
A Yazi plugin for searching file content or filenames using `ripgrep` with `fzf` preview
|
||||
|
||||
> [!NOTE]
|
||||
> The latest main branch of Yazi is required at the moment.
|
||||
>
|
||||
> Support shell: `bash`, `zsh` ,`fish` ,`nushell`
|
||||
|
||||
## Dependencies
|
||||
|
||||
- fzf
|
||||
- ripgrep
|
||||
- bat
|
||||
- nullshell(only windows need)
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
git clone https://github.com/DreamMaoMao/fg.yazi.git ~/.config/yazi/plugins/fg.yazi
|
||||
```
|
||||
|
||||
```powershell
|
||||
git clone https://gitee.com/DreamMaoMao/fg.yazi.git $env:APPDATA\yazi\config\plugins\fg.yazi
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
This option uses `ripgrep` to output all the lines of all files, and then uses `fzf` to fuzzy matching.
|
||||
|
||||
```toml
|
||||
[[manager.prepend_keymap]]
|
||||
on = [ "f","g" ]
|
||||
run = "plugin fg"
|
||||
desc = "find file by content (fuzzy match)"
|
||||
```
|
||||
|
||||
The following option passes the input to `ripgrep` for a match search, reusing the `rg` search each time the input is changed. This is useful for searching in large folders due to increased speed, but it does not support fuzzy matching.
|
||||
|
||||
```toml
|
||||
[[manager.prepend_keymap]]
|
||||
on = [ "f","G" ]
|
||||
run = "plugin fg --args='rg'"
|
||||
desc = "find file by content (ripgrep match)"
|
||||
```
|
||||
|
||||
```toml
|
||||
[[manager.prepend_keymap]]
|
||||
on = [ "f","f" ]
|
||||
run = "plugin fg --args='fzf'"
|
||||
desc = "find file by filename"
|
||||
```
|
||||
Reference in New Issue
Block a user