vim: Use tmux binbing only if tmux is used

This commit is contained in:
Mathieu Maret 2022-07-12 14:24:57 +02:00
parent 3dc7a2810f
commit 572515e550

4
.vimrc
View File

@ -337,16 +337,16 @@ set splitbelow
set splitright
" if multiple windows
if bufwinnr(1)
" vertically increase/decrease window size with alt+up/alt+down
if $TERM == "screen"
nnoremap <M-Up> :TmuxNavigateUp<cr>
nnoremap <M-Right> :TmuxNavigateRight<cr>
imap <M-Up> <ESC>:TmuxNavigateUp<cr>
imap <M-Right> <ESC>:TmuxNavigateRight<cr>
" " horizontally increase/decrease window size with alt+right/alt+left
nnoremap <M-Left> :TmuxNavigateLeft<cr>
nnoremap <M-Down> :TmuxNavigateDown<cr>
imap <M-Left> <ESC>:TmuxNavigateLeft<cr>
imap <M-Down> <ESC>:TmuxNavigateDown<cr>
endif
" switch to next/previous tab with ctrl+right/ctrl+left
map <C-Right> gt
map <C-Left> gT