I’ve found this to be pretty useful when needing to do recursive / multi-file search and replace. Also has bindings to work within terminal text editors like vim and helix.

Uses rust and ripgrep under the hood for speed.

  • @[email protected]
    link
    fedilink
    21 month ago

    Thanks, that’ll come in handy!

    I guess it’s worth mentioning that once (only once) I’ve seen ripgrep bring a whole LAMP stack production server to a full tilt. A dev using VSCode (which has rg as part of its ‘trojan horse’ vscode-server it installs and runs as root on any server it’s used to edit) did a search and ripgrep went into some kind of death loop hogging 100% of all cpu cores. Probably rare, but kind of shocked me. All our servers now babysit vscode-server with cgroups…

    • @[email protected]
      link
      fedilink
      English
      21 month ago

      I’m curious, why would VS Code be installed on the server and not a developers machine?

      • @[email protected]
        link
        fedilink
        5
        edit-2
        1 month ago

        The dev’s VSCode application installs a helper package in /root/.vscode-server. Separate copy for every user that connects. It runs a bunch of ‘node’ processes that often stack up more used CPU time than MySQL. I’m not a fan…

        • @[email protected]
          link
          fedilink
          English
          11 month ago

          Interesting, I appreciate the explanation.

          It’s crazy how much a single node instance can max out my huge desktop CPU, so I can imagine.