Code Monkey home page Code Monkey logo

Comments (5)

jimporter avatar jimporter commented on June 15, 2024

As you noticed, the way to do this is via C-u g and then tweaking the search using the minibuffer commands. There's probably an argument for reducing the number of keystrokes to do this, though I'm not sure I'd want it to be a single keystroke. It'd be pretty easy to accidentally hit them (but then on the other hand, it's just as easy to accidentally hit q and bury the buffer). Maybe mappings like M-s c in the Urgrep buffer would be ok (i.e. you could avoid typing C-u g before and RET after, so that's 3 or 4 fewer keystrokes depending on how you want to count things).

from urgrep.

wavexx avatar wavexx commented on June 15, 2024

Thanks for the answer!

Accidental typing wasn't an issue with the rg package. TBH, with either ripgrep and ugrep search is usually so fast, the main issue was accumulation of results in the buffer, slowing emacs down :(

I'll try/experiment a bit.

from urgrep.

jimporter avatar jimporter commented on June 15, 2024

I think it makes sense to keep this open, since I want to at least think about what (if anything) to do here. Making it easier to edit your search parameters is a pretty reasonable feature to add.

As an aside, while it doesn't help with Emacs slowness, the latest dev version of Urgrep now supports outline-minor-mode, so that's another way of managing overwhelming results: you can collapse all the sections and then only expand the files you want to look at results for.

(And for searches with many, many results, I do wonder if some of the slowness is due to the regexes Urgrep uses to fontify the results. Maybe simplifying those regexes or doing more work in urgrep-filter would help performance...)

from urgrep.

wavexx avatar wavexx commented on June 15, 2024

I was looking at introducing a new custom toggle for "ignore-files". Specifically, I want to be able to toggle the presence of "--no-ignore-files". Right now we have ignore-hidden, which I never used in the past, whereas what usually happens to me is that I have a default set of ignore rules for a project that I occasionally want to exclude.

I don't see an easy way to append a new flag or flags programmatically to the current tool, sort of "extra-flags", to implement this on top of the current interface.

from urgrep.

jimporter avatar jimporter commented on June 15, 2024

@wavexx I've started implementing something for this by adding single-key bindings for expanding context in the results buffer (C, B, A). I'll keep adding more commands like this over the next few days, but if you're impatient (or just want a toggle for something unusual), you can write your own commands based on this commit: 92e3fc9

from urgrep.

Related Issues (11)

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.