feat: add optional search and replace integration (grug-far.nvim) #250
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit adds an integration with grug-far.nvim, a plugin that provides a way to search and replace in the current working directory. It was recently added in LazyVim as the default, and it's really easy to use.
When you press the keybinding (default:
<c-g>
), yazi will close and grug-far.nvim will open with the current directory prefilled in the search field. This makes it easy to search and replace in that directory only. Note that this only seems to work when the target directory is under cwd, so it's not possible to search in a parent directory.grug-far-integration.mov
The integration is added as a keymap in the config. The keymap is set to
<c-g>
by default, but it can be changed in the config.To configure it, set one of these in your yazi.nvim config:
https://github.com/MagicDuck/grug-far.nvim