set ctrl-d to switch insert/command mode & revise some bug