Natestah / BlitzSearch

Blitz Search Tool Aims to be a replacement for any IDE's Find-in-Files
https://natestah.com
MIT License
44 stars 1 forks source link

Add Search Headers / Divider feature #51

Open Natestah opened 2 months ago

Natestah commented 2 months ago

Search Dividers are imperfect ways to highlight sections of text.. Without going all-in on specific language supports for getting actual ranges. It's like a periphery search that only comes up in results if there is a match below them..

for simple python you could say "def\s*\w+" and any text matches below that would include that as the header.

# Searching for 'mymatched' has a divider match so def my functions shows in the results too.
def myfunction(): 
   myMatched = 0
   doMoreThings()

It would would work very well for Flat structures in Markdown. but could get really ugly if we were to support multiple and try for nesting. I think for now adding support for One of these might be ok.