SeaGOAT icon indicating copy to clipboard operation
SeaGOAT copied to clipboard

improve vimgrep support by trying to guess result column

Open kantord opened this issue 1 year ago • 0 comments

While a --vimgrep flag exists now to provide some level of compatibility with tools that depend on the vimgrep format, it is hardcoded to assume that all results are on column 0.

While it is not possible to get a column number for results from vector embeddings, some heuristics could be applied

  • If the query interpreted as a regular expression matches a part of the result line, the beginning of the match could be the match column
  • if there is a partial match (for example a matching word, except for stopwords) that could be used to calculate the result match
  • Otherwise the first alphanumeric character could be used
  • If all else fails, fall back to 0

kantord avatar Jan 03 '24 21:01 kantord