/DRipGrepper

GUI to help parametrize ripgrep.

Primary LanguagePascalMIT LicenseMIT

💧 DRipGrepper

Yet another ripgrep GUI, written in Delphi Pascal. The goal is to create a useful standalone helper tool for searching and parametrizing ripgrep, then integrating as Delphi IDE extension. The release includes the standalone exe and a bpl file, which can be used as Delphi extension.

Screenshot

Features and Todos

Marked with checkmark if ready, else planned.

  • searches text, parses rg output
    • --vimgrep parser
    • error parser: if a line couldn't be parsed, then it is put in the first column (it maybe encoding problem)
    • --pretty parser matching lines with colorized match position
    • --context NUM (or -A=NUM -B=NUM) parser
    • --invert-match parser
    • --stats parser eg. msgbox on end with search statistics
  • toolbar buttons to
    • expand/collapse tree
    • show/hide icons
    • full/relative path
    • alternate row colors
  • copy rg command line into clipboard
  • sorting result groups by row / col / text
  • filtering results
  • file handling (eg. open in explorer, copy, rename, delete)
  • replace text in files --replace=TEXT
  • unicode support

🔍 Search Dialog

Screenshot

  • helps parametrizing rg.exe in search dialog
    • expert mode set in DripGrepper.ini makes rg options visible
      • option helper form
    • quick buttons for
      • --ignore-case
      • --case-sensitive
      • --word-regexp
      • --fixed-strings
    • --glob filter settings can be set in separate editbox
    • --hidden, --no-ignore can be set
    • --pretty can be set (not supported by rg.exe in vscode)
    • --context=NUM can be set

🚀 Open with...

Screenshot

  • show configured editors to open matching file on matching position
    • on double click
    • with menu / toolbar
  • separate editors for distinct extensions

Configure Open with...

Screenshot

Examples:

  • C:\Program Files\Notepad++\notepad++.exe "<FILE>" -n<LINE> -c<COL>
  • C:\Program Files\Microsoft VS Code\Code.exe --reuse-window "<DIR>" --goto "<FILE>:<LINE>:<COL>"
  • C:\Program Files\Git\usr\bin\vim.exe -u "C:\Program Files\Git\etc\vimrc" -c "+normal <LINE>G<COL>l" "<FILE>"
  • nvim-qt.exe "<FILE>" -- -c "+normal <LINE>G<COL>l"

Configuration

Configuration is stored in ini file (DripGrepper.ini for standalone and DripExtension*.ini for the extension)

  • search text history saved
  • search paths history saved
  • rg parameter history saved
  • view settings saved
    • ShowFileIcon
    • ShowRelativePath
    • AlternateRowColors
    • IndentLines
    • ExpandNodes
  • configurable length of history
  • Open with... settings saved
  • DebugTrace switch
  • configuration dialog

Delphi Extension

Screenshot

  • dockable window
  • high DPI Scaling
  • menu item in Tools (shortcut configurable in DripExtension*.ini)
  • Default shortcut Shift+Alt+R ( ⚠️ conflict with GExpert/MMX Reverse Statement)
  • click on matching file, opens file in the editor on position
    • expand collapsed code in {$REGION}-s
  • popup menu
    • delete history entries
    • copy path etc.
    • insert file as uses to interface/implementation section
  • save window position
    • save in layout
    • load saved layout
  • search selected text
    • multi line selection handling (in ini?)
  • search only in opened files/project files/project group
  • delphi extension release

Misc

  • screenshots in Readme.md
  • scoop install
    • standalone
    • delphi ide extension
  • chocolatey install

Installation

If you want to be up to date with the latest versions. Install Scoop, and then you can install and update dripgrepper from the official bucket 🆒

scoop bucket add dripgrepper-bucket https://github.com/mattia72/scoop
scoop install dripgrepper

Thanks