Your problem is that you put comments at the end of your lines separated by whitespaces. Vim interprets these whitespaces as part of your commands and mappings. If you replace: inoremap ii <esc> " ii to go back into command mode By " ii to go back into command mode inoremap ii <Esc> You will solve your problem. **As a general rule** don't put comments at the end of your lines in your `.vimrc` --- **And as a bonus** Here is a method to transform your `.vimrc` in a proper format. **Edit** Use this command. (Compared to the original one, the new line character `\r` can be directly copied and you don't have to use `^M`. Thanks @Sato!) :%s/\(^.*\)\s\+\(".*\)/\2\r\1 **Original command** :%s/\(^.*\)\s\+\(".*\)/\2^M\1 _(To insert the `^M` properly use <kbd>Ctrl-v</kbd><kbd>Enter</kbd> to insert a real new line character)_ This command will capture the beginning of lines containing a comment on the end of the line and replace the full line with two lines containing the comment and then the command. _(Note that the command seems to mess with the function `my_cr_function` so you might want to check that it doesn't create to much trouble in your `.vimrc` maybe replace `%` by some ranges and change your `.vimrc` step by step)_ --- @Sato also suggested [this link](https://github.com/vim/vim/issues/694#issuecomment-198063315) about how comments and multiline works it is worth reading it.