thatsIch / sublime-rainmeter

Rainmeter Package for Sublime Text 3

Home Page:https://thatsich.github.io/sublime-rainmeter/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for typos in auto completion

thatsIch opened this issue · comments

I am currently thinking about introducing a mechanism used in major IDEs which allow users to type not correctly matched search patterns for the smart auto completion component.

Imagine searching for superTest and just pre will suffice because superTest. But what if we want to allow ptr which would not match because the r is before the t.

I thought about an algorithm which puts a penalty on the search for each time the algorithm has to move backwards to search for a match. In the example above the algorithm would return -1 because it had to move back for the r once. The entries would be sorted by the penalty added to the matching distance. The fine tuning is important how to integrate the penalty into the distance metric.