commit 5520c37b8d2fc30d03be69cfff609235460fd22e
parent 206d690aefb7a70747dacbd2604e5f45fff735d5
Author: Alex Balgavy <a.balgavy@gmail.com>
Date: Tue, 28 Apr 2020 14:22:14 +0200
vim: make cursor change in tmux
Former-commit-id: 2722e553ba99e9c1f06de49289044ba25a865c4f
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/vim/vimrc b/vim/vimrc
@@ -553,8 +553,13 @@ endif
"
" Change cursor shape between insert and normal mode in iTerm2.app
if $TERM_PROGRAM =~ "iTerm"
+ if exists('$TMUX')
+ let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\"
+ let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\"
+ else
let &t_SI = "\<Esc>]50;CursorShape=1\x7" " Vertical bar in insert mode
let &t_EI = "\<Esc>]50;CursorShape=0\x7" " Block in normal mode
+ endif
endif
" Highlight current line