One of my favorite things about Sublime Text 2 is that it does autocompletion on everything you type based on the Levenshtein distance your current word has from other words already in your current editor file.
For example, check out the attached image. It shows how without actually knowing the object I'm completing from, it will still attempt to autocomplete my statement based on things I've already typed. In this case, It sees that so far I've type paren and it recognizes that in other parts of my file I have already typed the words parent and parentControllerName. In my second, smaller screenshot you can see where the Levenshtein distance comes into play. It actually will still attempt to auto complete even if you mistype a character or two. Extremely useful.
EDIT: I'm sure you can find a clean implementation in other places, but for reference, here's a quick nodejs module I put together that calculates Levenshtein distance: https://github.com/tonylukasavage/ld/blob/master/lib/ld.js