Skip to content

feat: independent search#30

Open
tbung wants to merge 4 commits intopetertriho:mainfrom
tbung:feat-independent-search
Open

feat: independent search#30
tbung wants to merge 4 commits intopetertriho:mainfrom
tbung:feat-independent-search

Conversation

@tbung
Copy link
Contributor

@tbung tbung commented Jan 10, 2022

Closes #5.

I'll commit some more documentation later (i.e. on replacing rg with a different tool). We may consider replacing rg by default with grep, although rg is faster everybody has grep installed.

@vuki656
Copy link

vuki656 commented Jan 10, 2022

Regarding rg, I'd suggest checking if it's executable and if not, falling back to grep since as you said most people have it installed.

If you default to grep, a good chunk of people won't bother to change it and will have a worse experience out of the box.

@tbung
Copy link
Contributor Author

tbung commented Jan 10, 2022

Good idea, added!

end


if vim.fn.executable(command) ~= 1 then
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably isn't needed anymore

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably worth just keeping this just in case

Copy link
Contributor Author

@tbung tbung Jan 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this basically cleanly saveguards against not having grep installed. I know grep is on every Linux system, I don't know about macOS, and I'm sure Windows doesn't have it.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this check on line 27 and on line 21 are the same?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it's to check for rg then grep

@petertriho
Copy link
Owner

This is looking good. I'll need to test this before I merge this in but do you know if this works with things like ignorecase?

@tbung
Copy link
Contributor Author

tbung commented Jan 11, 2022

I completely forgot about that, I will have to conditionally add some flags. Shouldn't be difficult, I'll update later today.

@CallumHoward
Copy link

Any update on this one?

@petertriho
Copy link
Owner

@CallumHoward Refactor of the main codebase is in the works, I'll try to add independent search based off this when I have the chance

@CallumHoward
Copy link

I'm excited for this refactor! Thanks for your hard work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Make search marks independent of hlslens

4 participants