Vim mapping works in command mode but not when used in autocmd -


i have autocmd in .vimrc:

autocmd filetype markdown inoremap <buffer> <cr> <c-o>:call autoumdlist()<cr> 

when open markdown file, enter insert mode , press <cr>, following error:

e15: invalid expression: ^o:call autoumdlist()^m e15: invalid expression: ^o:call autoumdlist()^m press enter or type command continue 

but if go in insert mode , type <c-o>:call autoumdlist()<cr> works!

also, if type following in command mode works:

:inoremap <buffer> <cr> <c-o>:call autoumdlist()<cr> 

what going on here please?! don't understand why autocmd won't work...


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -