My keybindings are consistent and work across different operating systems, terminal emulators, browsers, tmux, etc. There are no clashes, but this sometimes means remapping things in some instances.
Therefore my vim-tmux-navigator
mappings are probably a little unusual:
nnoremap <silent> <C-M-h> :TmuxNavigateLeft<CR>
nnoremap <silent> <C-M-j> :TmuxNavigateDown<CR>
nnoremap <silent> <C-M-k> :TmuxNavigateUp<CR>
nnoremap <silent> <C-M-l> :TmuxNavigateRight<CR>
They work in nvim
but I have never got them to work in vim
, but since I got this answer a while ago, I now understand why.
To get the correct mappings that work in vim
in that question for <M-S-j>
, you can have to enter the code by typing C-v
and then <M-S-j>
, resulting in something that looks like ^[J
(typing those characters does not result in the same code and they get highlighted in different colours).
This is not possible when the Ctrl
key is being used in the mapping. Is there a way of getting this code somehow?
I have:
nvim on Linux
vim on Linux and Windows
gvim on Linux and Windows
...available for input. It is only vim on Linux that this problem applies to, as there is no tmux used elsewhere other than with nvim on Linux, but the problem does not occur there as nvim accepts the syntax above.
.vimrc
.