Giter VIP home page Giter VIP logo

Comments (9)

wincent avatar wincent commented on July 17, 2024 1
  • People choose ag because it is faster than ack.
  • People choose rg because it is faster than ag.

Basically all of them have similar feature sets. Some of the option names are different, but they all basically have the same options (discoverable through --help).

from ferret.

wincent avatar wincent commented on July 17, 2024 1

I've done a couple of things now:

  • Add --no-config to the default args list for rg.
  • Add g:FerretExecutableArguments to allow people to set whatever default arguments they want to any or all of the executables that Ferret supports.
  • Add ferret#get_default_arguments() so that you can query the current defaults (useful if you just want to grab the current defaults and tack something additional on the end).

from ferret.

wincent avatar wincent commented on July 17, 2024

Hm, not sure. I'm not using Ack anymore myself, preferring either ag or rg. I would have thought that Ack would consult the config file if found.

There is a place in the plugin where you could hard-code your preferred options:

let s:executables={
\ 'rg': 'rg --vimgrep --no-heading',
\ 'ag': 'ag',
\ 'ack': 'ack --column --with-filename',
\ 'ack-grep': 'ack-grep --column --with-filename'
\ }

Obviously, this might be the kind of thing that would be useful to offer customizability via an option.

from ferret.

Syn3iotiC avatar Syn3iotiC commented on July 17, 2024

Could you please convince me with 2-3 reasons why most people've recently prefered rg and ag ?
and If it's that good, could you suggest me basic configurations for ripgrep ?

Thanks!

from ferret.

Syn3iotiC avatar Syn3iotiC commented on July 17, 2024

I've tried rg
here is my config.

let s:executables={
      \   'rg': 'rg --vimgrep --no-heading -g "\!tags"'
      \ }

I tried to exclude filename 'tags'
When I ran rg Customization -g "\!tags", the result is correct.
But using rg inside Ferret caused me error No results for search pattern Customization: press ENTER to continue

NOTE, I tried

let s:executables={
      \   'rg': 'rg --vimgrep --no-heading -g "!tags"'
      \ }

too

from ferret.

wincent avatar wincent commented on July 17, 2024

I think you want to drop the quotes around !tags. ie. just do:

let s:executables={
      \   'rg': 'rg --vimgrep --no-heading -g !tags'
      \ }

There is no shell involved, so no need to escape for the shell.

from ferret.

Syn3iotiC avatar Syn3iotiC commented on July 17, 2024

Thanks alot!

from ferret.

benvds avatar benvds commented on July 17, 2024

Hi! Great plugin, I really appreciate all the work you put in.

I was also hoping for an override of the default options as I have a .ripgreprc file which breaks ferret's use of rg:

--max-columns=160
--smart-case

Default Ack usage doesn't work now, e.g. :Ack map. But adding --no-config solves this: :Ack --no-config map.

I can image this option differs per search programming. Can you add --no-config to the ripgrep call or maybe allow people to override this option?

Many thx in advance!

from ferret.

wincent avatar wincent commented on July 17, 2024

@benvds:

I can image this option differs per search programming. Can you add --no-config to the ripgrep call or maybe allow people to override this option?

Both of those are probably good ideas.

from ferret.

Related Issues (20)

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.