Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/halkn/vim-agrep

vim plugin for grep.
https://github.com/halkn/vim-agrep

vim-plugin vim-plugins

Last synced: about 2 months ago
JSON representation

vim plugin for grep.

Awesome Lists containing this project

README

        

# vim-agrep

This is a small vim plugin. grep in vim.
Grep asynchronously using the `job` of vim.

## Usage

This plugin will use `grepprg` to grep.
Set up `grepprg` in your vimrc with the following statement.

```vim
" use git grep.
set grepprg=git\ grep\ -I\ --line-number

" Or use ripgrep.
if executable('rg')
let &grepprg = 'rg --vimgrep --hidden'
set grepformat=%f:%l:%c:%m,%f:%l:%m
endif

" write in vimrc
nmap a (agrep-input)
```

Run

```vim
:Agrep foo
:Agrep foo bar "bar is the directory to search
:AgrepStop
```

## License

[MIT](LICENSE)