How can I have different cursor shapes when running vim inside tmux under cygwin?
WITHOUT tmux these lines would be enough to achieve what I want:
let &t_SI = "\e[5 q"
let &t_EI = "\e[2 q"
But somehow my tmux breaks it - cursor has block shape no matter what vim mode I'm in.
My specs:
- Windows 7 x64
- Cygwin x86
- TMUX 1.9a
- Vim 7.4.726 (compiled with +cursorshape)
- terminal emulator: mintty 1.1.3
- used in Cygwin Terminal or Cmder (either way, cursor shapes work only without TMUX)
echo $TERM
gives mescreen-256color
(in TMUX and outside of it, because i haveexport TERM=screen-256color
in my.bashrc
.tmux.conf
contains:
set -g default-terminal "screen-256color" setw -g xterm-keys on
What i tried already without success:
export TERM=xterm
export TERM=vt100
- "rightclick on bar > Options > Looks > Cursor" (it changes the cursor permanently, vim modes still don't change it)
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1;BlinkingCursorEnabled=1\x7\<Esc>\\"
andlet &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0;BlinkingCursorEnabled=0\x7\<Esc>\\"
?xterm-256color
inside tmuxscreen-256color
. tmux has version 1.9 (and your is 1.9a). I've launch vim inside tmuxvim -u NULL
(-u NULL means no config). Cursor shape is block in any mode, but when I assignt_SI
andt_EI
shape switch from block (normal mode) toI
(insert mode) as expected. Can you try to launch vim with empty .vimrc, without any colorschemes and plugins?