This is especially handy in PHP, where I often type array_m + ESC, and expect array_merge (or array_map) to appear, even though it's not in by buffer. In name-spaced languages like python this would be trickier, but could still useful I think. Anyway, implementation is easy enough.
My idea is that a list of words could "seed" the candidates variable in the find_candidates function. I'm imagining a system that uses built-ins and the user's language-specific settings file, so that this list could be configured per-language.
This is especially handy in PHP, where I often type
array_m
+ ESC, and expectarray_merge
(orarray_map
) to appear, even though it's not in by buffer. In name-spaced languages like python this would be trickier, but could still useful I think. Anyway, implementation is easy enough.My idea is that a list of words could "seed" the
candidates
variable in thefind_candidates
function. I'm imagining a system that uses built-ins and the user's language-specific settings file, so that this list could be configured per-language.Built-in config files are easy enough:
And to make things even better, combine that list with
User/__language__.sublime-settings
.The built-in settings file is simple enough:
And user settings: