Enan Ajmain
unread,Jul 14, 2023, 2:24:27 PM7/14/23Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vim...@googlegroups.com
According to ":h termcap-cursor-shape", I have this in my vimrc:
let &t_SI = "\e[6 q"
let &t_SR = "\e[4 q"
let &t_EI = "\e[0 q"
I want to turn off cursor blinking but there is no such option in MS
Terminal. I could use "\e[2 q", which is the code for non-blinking
block cursor, but I need "\e[0 q" because I want to use my user-defined
cursor shape.
I found there is an specific xterm sequence for turning off blinking
without changing cursor shape: "\e[?12l". I added this to t_EI:
let &t_EI = "\e[0 q\e[?12l"
And it works as expected: the cursor shape is the user-defined one and
it doesn't blink. The issue is: now the terminal screen is refreshed
every time I change the mode from insert to command-line and vice-versa.
And the replace mode ":h r" doesn't finish until I press an extra key,
e.g., "rx" doesn't replace the character under cursor to "x". It goes
into replace mode with underline cursor shape and shows "rx" in the
ruler below the statusline. Only when I press another key does Vim gets
back to normal mode (and causes another screen refresh).
This doesn't happen in Linux. I checked in native Linux (Vim version
9.0.1592), not WSL. And my Win32 Vim version is 9.0.1640.
I also checked with << let &t_EI = "\e[?12l" >> just to make sure having
two codes together wasn't the causing factor here. It resulted in the
same issue. Which means, "\e[?12l" code is the issue, with and without
other codes in conjunction.
Any idea why the Win32 Vim is acting differently to the Unix version?
Are codes like "\e[?12l" supported in Vim?
--
Enan