Add auto complete function

But there's still bug about paste and input action