vim-fuzzysearch
vim-fuzzysearch copied to clipboard
Limit length of result
Hi! Im not good at regex, how do I limit the length of the result? Make the result not longer than 3 of 4 chars of my input.
Ex. I dont want to match 'Fr' with 'Fo foo The rep', only results that is shorter that 'Fr' (2 chars) + example 3 chars, in total 5 chars. Only matching words like 'Fostr' at a maximum.
Thanks for a great plugin!
Not sure i understand, but either way I don't think it has much to do with this plugin?
Fuzzysearch doesn't let you use regex, and is meant as a very quick way to search inexactly, while not needing to write a complex query. It does this by generating a regex behind the scenes of course, but there is no functionality for escaping and also adding custom regex.
For more specific searches, using the normal searach is better, and then I recommend :h pattern-multi-items for your use case.
Thanks for your fast response and good suggestions! I found an other way of altering the sensitivity (which was my main issue). Take a look at my PR if it something worth implementing.