At home I use iTerm2 on MacOS X, and at work, I have a laptop with CygWin. I have another PC where I use gnome-terminal or terminator, and sometimes I use tmux.
I'm looking to configure the cursor shape in Vim in a way that will work in all above terminals emulators. I want the cursor to be a upright bar in insert mode and solid block in normal mode.
Anyone can help here? It's really uncomfortable when the cursor's shape is inconsistent when I switch between all my devices.
Below is the my current vimrc for cursur shape change, I got it from an online example, but it doesn't work in gnome-teriminal, terminator, tmux:
if &term == "^xterm" || &term == "^screen" let &t_SI = "\e[5 q" let &t_EI = "\e[2 q" endif if exists("$TMUX") let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\" let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\" endif