Giter VIP home page Giter VIP logo

nvim-rg's Introduction

nvim-rg

nvim-rg allows you to run ripgrep from Neovim or Vim and shows the results in a quickfix window. It was developed for use on macOS with Neovim. On Neovim, it runs asynchronously.

Usage

Search recursively in {directory} (which defaults to the current directory) for the {pattern}.

:Rg [options] {pattern} [{directory}]

When run without arguments, you will be prompted for a pattern, directory, and file type.

:Rg

Or

<leader>rg

To search for the word under the cursor use:

<leader>rw

Installation

Install ripgrep:

brew install ripgrep

Install this plugin using vim-plug (or your favorite plugin manager):

Plug 'duane9/nvim-rg'

Configuration

Specify a custom base command. By default, rg_command is set to rg --vimgrep:

let g:rg_command = 'rg --vimgrep'

Docs

See :help nvim-rg.

nvim-rg's People

Contributors

colinkennedy avatar duane9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nvim-rg's Issues

Looking for a group of words

Hi,

In neo vim, if I enter :Rg and put for pattern something like foo bar, I'll get the files containing foo bar.

My issue, but maybe I do the wrong syntax, is when I enter :Rg "foo bar" then I can see at the bottom of neo vim a message Searching... that will never disappear. And I get no result.

Is this an issue, or should I use another syntax?
Thanks.

Neovim - Inconsistent starting lines with `./` in searches

In Neovim 0.9+ & CentOS 7, often the output of :Rg can be a bit inconsistent. Sometimes it returns a quickfix list like:

foo.txt|6607 col 22| some text
./bar.txt|1 col 0| blah
foo.txt|6607 col 22| some text
buzz.txt|1 col 10| another

Sometimes every line starts with ./ or all does not start with ./

./foo.txt|6607 col 22| some text
./bar.txt|1 col 0| blah
./foo.txt|6607 col 22| some text
./buzz.txt|1 col 10| another

or

foo.txt|6607 col 22| some text
bar.txt|1 col 0| blah
foo.txt|6607 col 22| some text
buzz.txt|1 col 10| another

I frequently use vim-qfedit to filter / sort quickfix lines so the inconsistency can be difficult to handle at times, especially for large list results.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.