Add better support for writing in Vim

Signed-off-by: Albert Yu <dev.yufan@gmail.com>