I want to change cursors to a |
character in insert mode, and then back to a block in normal mode. I am using urxvt as my terminal, and neovim.
To switch cursors in my terminal, I run the following to get a blinking I-beam
echo -e "\033[5 q"
and then to go to a solid block:
echo e "\033[1 q"
I tried this in my vimrc
:
let &t_SI = "\033[1 q"
let &t_SR = "\033[5 q"
let &t_EI = "\033[5 q"
but it didn't work. Nothing different from normal happens when I enter and exit insert mode.
I also tried this in my vimrc
:
if has("autocmd")
au InsertEnter * silent execute "!print -n -- '\033[1 q'"
au InsertLeave * silent execute "!print -n -- '\033[3 q'"
au VimLeave * silent execute "!print -n -- '\033[5 q'"
endif
When I enter insert mode with this, the editor shifts up one line, and the status bar is shown twice at the bottom. When I exit insert mode, I see the text [3 q
below the statusbar. Any ideas? Thanks
Some links that I tried:
https://bbs.archlinux.org/viewtopic.php?id=177281 https://bbs.archlinux.org/viewtopic.php?id=155802