fish
fish

Reputation: 441

Changing Vim Cursor in MobaXTerm

I recently updated from MobaXterm 7.7 to MobaXterm 8.1 on my Windows machine for my SSH and X11 needs.

Since doing that, my Vim cursors have stopped changing when I enter different modes (i.e. insert mode) -- the cursor is now always a block cursor. Additionally, I noticed that if I change the default Terminal Cursor setting in MobaXterm, the console cursor remains a block cursor regardless (a possible bug?).

In the past, I added the following lines into my .vimrc file to address cursor shapes, but since updating to MobaXterm 8.1, this no longer works.

let &t_ti.="\e[1 q"
let &t_SI.="\e[3 q"
let &t_EI.="\e[1 q"
let &t_te.="\e[0 q"

I'm curious what is causing this.

After doing some research, I found the following line in MobaXterm 8.0 changelog:

Improvement: The embedded terminal is now based on a plain PuTTY engine

If I recall correctly, you have limited ability to change cursors within the PuTTY environment. Does this mean I can no longer change my Vim cursors while using MobaXterm? Alternatively, is there some .vimrc command I don't know about? Is this all just a bug or is it intended?

Thanks!

Upvotes: 7

Views: 5621

Answers (2)

zcc
zcc

Reputation: 9

enter image description here

colors customize – > cursor type

Upvotes: 0

Thomas Dickey
Thomas Dickey

Reputation: 54543

None of PuTTY's cursor-related control sequences end with "q". It sounds as if MobaXterm's developers do not want to bother with applying their patch.

Checking current PuTTY source (0.65), it has (as expected) "limited" ability to change the cursor's appearance. It handles these escape sequences when the SCO/ANSI feature is enabled:

  • \e[=2c (block cursor)
  • \e[=1c (normal cursor)
  • \e[0c (hidden cursor)
  • \e[=x;yC (draws cursor from scan lines x to y)

Also, the cursor can be changed to/from a block cursor (for normal "VT220" mode) using \e[?34h and \e[?34l.

Upvotes: 2

Related Questions