I have put the following in my .vimrc:inoremap <Up> <C-c>gka    But sometime, instead of moving my cursor, gka is inserted as text as I am in insert mode. It seems the <C-c> did not work as expected. This behavior appears also with mappings that use <C-o> and <Esc>.I don't know if could be related to this config:set timeoutlen=1000set ttimeoutlen=0set timeoutset nottimeoutI am running on Cygwin mintty
inoremap  gka sometime does not work
key bindings
The following mapping works fine here:inoremap <up> <c-o>gkNote that using Ctrl+O you don't need the a at the end of your mapping to get back to insert mode. And you should generally avoid using using Ctrl+C to exit insert mode, as it can break some functionality and plugins.You could try the following to debug your problem:1) Check if the problem happens in vanilla vimStart Vim with vim -u NONE -U NONE -N -i NONE. If the problem doesn't happens, it means you have a problem related to some setting/plugin. In this case you could follow the steps at Vim-FAQ  2.5 - I have a xyz (some) problem with Vim. How do I determine it is a problem with my setup or with Vim?  / Have I found a bug in Vim?.2) Try to map another key instead of the arrow keysStill with vanilla Vim, try mapping to a regular key:inoremap a <c-o>gkIf the problem doesn't happens, check the instructions at Vim-FAQ  10.9 - When I use my arrow keys, Vim changes modes, inserts weird characters      in my document but doesn't move the cursor properly. What's going on?, which references some relevant options such as 'ttimeoutlen'.3) Try other terminals/gVimIf nothing else solves the problem, the problem is probably related to your terminal. You could try using another terminal or, even better, gVim (Graphical Vim), which is available on Windows and thus would allow you to avoid Cygwin and any problem related to shell limitations.