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
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20230715002411.0000222c%40gmail.com.
Friday, July 14, 2023
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment