I'm trying to use ac to copy the whole contents to the system clipboard in gVim. Putting this in my .vimrc isn't working:
nnoremap <leader>ac ggvG$<C-Insert>
If I manually press ggvG$[Ctrl-Insert]
from normal mode, it works as expected: goes to the top, selects to the bottom, copies it all, and drops me in normal mode at the top of the file.
When I set nnoremap <leader>ac ggvG$<C-Insert>
in my .vimrc, and then activate it (with [Space]ac
), it selects from the top to the bottom, beeps an error, and then just sits there in visual mode with the whole file selected.
If I manually press [Ctrl-Insert]
at that point, it finishes as expected. So I'm pretty sure vim's just not doing the <C-Insert>
part.
I further tested by adding this vnoremap <leader>ci <C-Insert>
.
I selected a word or a line in visual mode, activated that map, and got a beep and no copying. A manual [Ctrl-Insert]
works fine.
So why can't I map to <C-Insert>
?