An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

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.

![fuzzy-search-and-edit](https://cloud.githubusercontent.com/assets/674812/16119705/79da30a2-33fe-11e6-9827-416c961a8b5f.gif)

# 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 `