Skip to content

Instantly share code, notes, and snippets.

@sicktastic
Created November 3, 2017 17:13
Show Gist options
  • Save sicktastic/d560141c0005bbd738c2fd8112596425 to your computer and use it in GitHub Desktop.
Save sicktastic/d560141c0005bbd738c2fd8112596425 to your computer and use it in GitHub Desktop.
Terminal vim to have insert cursor
" set the cursor to a vertical line in insert mode and a solid block
" " in command mode
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"
let &t_EI = "\<Esc>]50;CursorShape=0\x7"
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment