Some optimized
Add vim-style input control code
cleanup
Fix completion