Reputation: 12008
I have this mapping:
noremap! <F6> <c-o> :SCCompile<cr>
But when I press F6 in insert mode, it just input ":SCCompile\n" in the buffer instead of going to normal mode to execute a command.
It works with map!
but not with noremap!
Upvotes: 0
Views: 101
Reputation: 31040
That's interesting that you say it works with map!
because I can't get it to work with map!
either. We might be using different versions; however, the appropriate way to do this is to remove the space after <C-o>
like this:
noremap! <F6> <c-o>:SCCompile<cr>
<c-o>
in insert mode takes one normal command and a space counts.
Upvotes: 2