While writing plain text (not code), I'd like a completion based on more context, an exmple would speak more so here it is:
Given the following buffer (a preloaded big text corpus would make more sense in reality):
foo bar baz
foo bar baz
foo bar boo
poo bar bot
and then typing:
foo bar
(followed by a space and M-/) I'd like dabbrev (or something else) to propose, in the following order:
baz
, because it appears twice afterfoo bar
, so it's the more probable one.boo
, because it appears afterfoo bar
bot
, because it appears afterbar
Currently dabbrev
would propose bot
first, as the nearest possible word following bar
, if I understand correctly.
In other words, I'd like completion based on Markov chains. Does it already exists? Would it be hard to implement?