This question already has an answer here:
I'm trying to remap C-o to be 'make new line below' (without going to insert mode, as opposed to
o) and C-S-o 'make new line above' (without going to insert mode). I do this a lot when reformatting code. I set a mark so that I end up at the same location:
nnoremap <C-o> mxo<Esc>`x noremap <C-S-o> mxO<Esc>`x
But it inserts a line above in both cases. Why doesn't it work? Can I make it work?
Using Terminal vim.