Unfortunately I think that the comment of EvergreenTree is right: you can't map ctrl as a single key into vim.
Also I tried to get what you want using the langmap
option which allows to substitute a key with another one in normal mode. I thought something like set langmap +=\ ^
could have worked but it doesn't (with that, Space get your cursor at the beginning of the line).
So the best I could suggest to you is to add the following lines to your .vimrc
:
function! RemapSpaceToCtrl()
for l:char in range(97, 122)
let l:char = nr2char(l:char)
execute 'nnoremap <silent> <Space>' . l:char . ' <C-' . l:char . '><CR>'
endfor
endfunction
call RemapSpaceToCtrl()
The function maps <Space>X
to <C-X>
where X
is all the letters of the alphabet. This way Space + a increments a number, Space + f goes down one page etc...
That's probably not the cleanest solution and you might want to improve it but that could be a workaround.
To render unto Caesar the things which are Caesar's I get inspiration to map a prefix followed by different letters to another prefix followed by the letters from a function written by CarpetSmoker here
<CR>
is Enter, not Control ... and I think you will need to remap Ctrl to Space at OS level.<C-e>
. You will have to remap it at OS level, like @VanLaser said.