add format and move cursor in insert mode