After a little bit more digging into :help
I found out that
autocmd VimLeave * let &t_me="\<Esc>]50;CursorShape=1\x7"
would revert the cursor shape to its initial, or let's say a defined, shape. That works great so far.
Does anyone know downsides of that approach? Besides VimLeave
one could also trigger VimLeavePre
or QuitPre
.
EDIT: Even better there's a new plugin available which does exactly what some people are looking for.
https://github.com/jszakmeister/vim-togglecursor
It's a little bit configurable, too:
let g:togglecursor_default = "block"
let g:togglecursor_insert = "line"
let g:togglecursor_leave = "line"
let g:togglecursor_disable_tmux = 0