Last active
March 15, 2019 01:24
-
-
Save fjrti/77615d69425099e2d95c5c7156417f5b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! SetCursorStyle() | |
if &term =~ "xterm\\|rxvt" | |
" use a | cursor in insert mode | |
let &t_SI = "\<Esc>]50;CursorShape=1\x7" | |
" use a rectangle cursor otherwise | |
let &t_EI = "\<Esc>]50;CursorShape=0\x7" | |
" reset cursor when vim exits | |
autocmd VimLeave * silent !echo -ne "\<Esc>]50;CursorShape=0\x7" | |
endif | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment