Challenge: How to map Ctrl+Spacebar to Ctrl+N in vim?

KingNothing

Diamond Member
Apr 6, 2002
7,141
1
0
In Vim, if I'm in insert mode and press Ctrl+N, it'll do code completion on whatever I've typed. Very handy, but I'm used to other editors where Ctrl+Spacebar does this and the spacebar is a lot easier to hit than the N key is. I've tried:

_ represents space

:map! ^V__ ^N <-- this maps JUST the spacebar to ^N, which is seriously annoying

:map! ^V<Space> ^N <-- this does nothing

HELP! :frown:

Edit: Many have tried, none have succeeded. Show your geekiness and make this work!
 

KingNothing

Diamond Member
Apr 6, 2002
7,141
1
0
Originally posted by: yoda291
you could try using <> notation. In your case I think it's <C-SPACE> .

Didn't work, I tried:

:map! <C-SPACE> ^N
:map! <C-Space> ^N

I'm using Vim 6.1 on Cygwin, BTW.
 

KingNothing

Diamond Member
Apr 6, 2002
7,141
1
0
Nope. The bit you found about mapping the spacebar is correct, but I tried your suggestions and variations on them and it didn't work.