1

I am using vim inside tmux

I was trying to map

nmap <c-Tab> :bnext<CR>                        
nmap <c-S-Tab> :bprevious<CR>

but realized that it was ridiculously difficult so I stopped.

I now succeeded to map the following 4 in vim AND vim+tmux:

nmap <c-left> :bprevious <CR>
nmap <c-right> :bnext <CR>    
nmap <c-S-left> <c-w>h
nmap <c-S-right> <c-w>l

But those following 2 are working in vim itself, but NOT working in vim within tmux

nmap <c-S-up> <c-w>k 
nmap <c-S-down> <c-w>j

When I do this the "tmux window is moving up/down".

=> This is then a tmux "issue", I don't use this tmux feature so I want to unbind those combinations (Ctrl+Shift+Up/Down) in tmux (I think that It will then work in vim). How can I do it ?

EDIT1: my .tmux.conf

# Use <C-a> instead of the default <C-b> as Tmux prefix
set-option -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix

# This option with vim set term=xterm-256color allow CTRL mappings
set-option -gw xterm-keys on

# Options to enable mouse support in Tmux
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# For Tmux >= 2.1
set -g mouse on

# Escape time for libtermkey
# (see https://github.com/neovim/neovim/issues/2035):
set -sg escape-time 10

# Act more like vi:
set-window-option -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
unbind p
bind p paste-buffer
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-selection
Community
  • 1
  • 1
statquant
  • 13,672
  • 21
  • 91
  • 162

1 Answers1

2

Have you tried doing in your tmux.conf:

unbind-key C-S-Up
unbind-key C-S-Down
BBF
  • 21
  • 2