Skip to content

Instantly share code, notes, and snippets.

@dinesh0430
Created September 8, 2020 09:00
Show Gist options
  • Save dinesh0430/6429410f79f54bfdd12e0b1c7bce50c1 to your computer and use it in GitHub Desktop.
Save dinesh0430/6429410f79f54bfdd12e0b1c7bce50c1 to your computer and use it in GitHub Desktop.
Similar to vim, works for neo-vim.
autocmd VimEnter * silent !echo -ne "\e[3 q"
autocmd VimLeave * silent !echo -ne "\e[3 q"
autocmd VimLeave * let &t_me="\<Esc>]50;CursorShape=1\x7"
autocmd VimLeave * call system('printf "\e[5 q" > $TTY')
" To set the cursor back to bar while exiting neovim
au VimLeave * set guicursor=a:ver25-blinkon250
" Change the cursor behaviour
set guicursor=n-v-c:block,i-ci-ve:ver25,r-cr:hor20,o:hor50
\,a:blinkwait700-blinkoff400-blinkon250-Cursor
\,sm:block-blinkwait175-blinkoff150-blinkon175
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment