https://github.com/seletskiy/zsh-fuzzy-search-and-edit
Find and open editor on matched line lightning-fast
https://github.com/seletskiy/zsh-fuzzy-search-and-edit
Last synced: 8 months ago
JSON representation
Find and open editor on matched line lightning-fast
- Host: GitHub
- URL: https://github.com/seletskiy/zsh-fuzzy-search-and-edit
- Owner: seletskiy
- Created: 2016-06-16T13:41:44.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-12-20T12:20:29.000Z (almost 6 years ago)
- Last Synced: 2025-03-20T00:11:32.127Z (8 months ago)
- Language: Shell
- Homepage:
- Size: 8.79 KB
- Stars: 34
- Watchers: 2
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-zsh-plugins - fuzzy-search-and-edit - ZSH plugin for fuzzy searching files and instantly opening a matched file on matched line. (Plugins / ZSH on Windows)
- fucking-awesome-zsh-plugins - fuzzy-search-and-edit - ZSH plugin for fuzzy searching files and instantly opening a matched file on matched line. (Plugins / ZSH on Windows)
- awesome-zsh-plugins - fuzzy-search-and-edit - ZSH plugin for fuzzy searching files and instantly opening a matched file on matched line. (Plugins / Zinit (née zplugin))
README
# fuzzy-search-and edit
It's a plugin for zsh, which offers widget for fuzzy searching and instantly
opening matched file on matched line.

# Requirements
* [fzf](https://github.com/junegunn/fzf);
* [zsh-async](https://github.com/mafredri/zsh-async);
# Installation
## Via zgen
```fzf
zgen load mafredri/zsh-async
zgen load seletskiy/zsh-fuzzy-search-and-edit
```
## Via zplug
```fzf
zplug "mafredri/zsh-async", from:"github", use:"async.zsh"
zplug "seletskiy/zsh-fuzzy-search-and-edit"
```
# Usage
```fzf
bindkey '^P' fuzzy-search-and-edit
```
# Options
## FZF Options
For a full list of options, see the [fzf](https://github.com/junegunn/fzf) documentation.
To control the default arguments passed to `fzf`, the variable `FZF_DEFAULT_OPTS` should be set and exported. Key bindings for use within fzf can be specified as part of the command-line arguments.
## Editor invocation
The default editor command uses the global shell `EDITOR` variable for the command of the tool to open, and provides file, line number, and tty to (take over the current prompt) in the format used by vi/vim.
### use-visual
```fzf
zstyle ':fuzzy-search-and-edit:editor' use-visual yes
```
Will use the `VISUAL_EDITOR` variable instead of `EDITOR` if it's set. Falls back to `EDITOR` if `VISUAL_EDITOR` isn't set. Will also leave off the `