You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Vim (neovim) cursor shape does not change (BLOCK to VLINE shape). #270
For example, I can change the shape on iTerm2/VIM with the follow setup:
let $NVIM_TUI_ENABLE_CURSOR_SHAPE=1
let &t_SI = "\<Esc>]50;CursorShape=1\x7"
let &t_SR = "\<Esc>]50;CursorShape=2\x7"
let &t_EI = "\<Esc>]50;CursorShape=0\x7"
Appreciate any help at all.
Thanks!
Reacted by Jamis Charles, Michael Chris Lopez, Tae Selene Sandoval Murgan, Skip R., Cole Peters, Fabricio C Zuardi, Chrıs Seelus, Adrian Perez, Ben Orozco, Darrell Sandstrom and 3 more
Not sure if this is helpful, but it looks like something is causing the app to not recognise the cursor style (which is evaluating to 5):
Interestingly, I’m not able to find the code shown in the above bundle.js anywhere in Hyperterm’s source code, and it’s not coming from any of my plugins. 🤔
It looks like there are actually two different sets of cursor changing escape codes. The first is ^[[50;CursorShape=1. That's what many people configure their Vim to use. The other one, which Neovim uses, is ^[[5 q. I think the reason Neovim uses this one is because it lets you specify that the cursor should blink. However, hterm only partially supports it. Block and underline cursors are supported, both blinking and not blinking, but I-beam cursors are not.
Fixing this would require fixing hterm, and should be as easy as a quick pull request. Unfortunately, hterm is part of the Chromium OS codebase, and Google does not make anything that easy when it comes to their open-source projects. If someone else can figure out how to contribute code to Chromium, they'd just have to add a few cases here.
Activity
szhu commentedon Jul 19, 2016
Btw for whoever submits a pull request to fix this, here's some CSS that will make the cursor a vertical line:
jamo commentedon Jul 22, 2016
There is also now a config option for the cursor shape: https://github.com/zeit/hyperterm/blob/master/config-default.js#L13 added in: e66d6c9
colepeters commentedon Sep 11, 2016
Not sure if this is helpful, but it looks like something is causing the app to not recognise the cursor style (which is evaluating to
5):Interestingly, I’m not able to find the code shown in the above
bundle.jsanywhere in Hyperterm’s source code, and it’s not coming from any of my plugins. 🤔This is the relevant section of my
init.vimfor Neovim (running on macOS), which accomplishes the same thing as @henryoliver’s setup above (see here for documentation from Neovim):tbodt commentedon Dec 20, 2016
It's in the
hterm-umdjsdependency.tbodt commentedon Dec 20, 2016
It looks like there are actually two different sets of cursor changing escape codes. The first is
^[[50;CursorShape=1. That's what many people configure their Vim to use. The other one, which Neovim uses, is^[[5 q. I think the reason Neovim uses this one is because it lets you specify that the cursor should blink. However, hterm only partially supports it. Block and underline cursors are supported, both blinking and not blinking, but I-beam cursors are not.Fixing this would require fixing hterm, and should be as easy as a quick pull request. Unfortunately, hterm is part of the Chromium OS codebase, and Google does not make anything that easy when it comes to their open-source projects. If someone else can figure out how to contribute code to Chromium, they'd just have to add a few cases here.
tbodt commentedon Dec 20, 2016
Here's the iTerm2 pull request that added these escape sequences:
gnachman/iTerm2#92
tbodt commentedon Dec 20, 2016
Interestingly, the neovim special cursor for replace mode does work. It's an underline which hterm does support.
colepeters commentedon Dec 20, 2016
Nice detective work, @tbodt! Hope this helps for future improvements. 🕵🏻
tbodt commentedon Dec 20, 2016
It looks like hterm is such a pain in the ass to contribute to that Hyper is already monkey patching it. I'm gonna pull request this.
tbodt commentedon Dec 21, 2016
Fixed in pull request #1286.
Add support for cursor styles 5 and 6 to hterm (#1286)
guiltyred commentedon Mar 16, 2018
Having this issue in the latest version of canary, is it a regression from the change to xterm?