user1166025
user1166025

Reputation: 1

tmux vim and c-space

I recently thought about switching from gvim to tmux+vim, however I got problem with vim accepting C-Space and C-Backspace.

I use these keysbindings since years to switch through my buffers, but when using vim in tmux these strokes are simply ignored.

I tried using

unbind Space
unbind C-Space
unbind -n Space
unbind -n C-Space
unbind -a Space
unbind -a C-Space

interestingly (but that is another matter) the latter two give me

/home/xxx/.tmux.conf:45: usage: unbind-key [-acn] [-t key-table] key
/home/xxx/.tmux.conf:46: usage: unbind-key [-acn] [-t key-table] key

(can anyone explain to me why "unbind -a key" does not work?).

Well - to sum things up: I'd really like to use tmux, but all googling into the C-Space problem brought me nowhere and without solving this problem I'd rather stick to gvim...

Greetings, Richard

Upvotes: 0

Views: 1146

Answers (1)

romainl
romainl

Reputation: 196486

For reasons beyond my comprehension, Vim doesn't get <C-Space>, it gets <C-@> so you only need to use <C-@> instead of <C-Space> in your mappings:

nnoremap <C-@> <whatever>

You won't fix that problem on tmux's side.

Upvotes: 1

Related Questions