This may be trivial but I couldn't find a way to make this mapping work.
I have the following mapping in my .vimrc
to compile a file using clang
and run it afterwards:
map <F5> :wa \| !clang++ -g -std=c++11 % -o test && ./test : <CR>
I want to add the same mapping in insert mode but I doesn't seem to work. One of the many things I've tried (including wrapping the mapping in a separate function) was:
imap <F5> <C-o> <F5>
How can I make this mapping work in insert mode?