-
-
Notifications
You must be signed in to change notification settings - Fork 581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linux Subsystem for Windows - Vim - Mouse Cursor Doesn't Change Change Width #937
Comments
Looks like Microsoft fixed this March 20th. Limited to Insider builds for now. Source: microsoft/terminal#68 So with an Insider build of Windows, this will work (added to .vimrc): let &t_SI.="\e[5 q" I'm not sure if they fixed the root issue of not passing ReadConsole state or if they're just fixed the escape sequences. If it's the latter, explicitly tell vim what you want the cursor set to be you're all set |
The related windows issue microsoft/terminal#68 has been fixed in Windows 10 version 1809 (Build 17763.194). Running bash.exe directly (not through ConEmu), the cursor changes in insert mode: @Maximus5 Not sure if this fixes the root issue you mentioned before that prevents ConEmu from accessing the Real Console state. Any plans to look into this in light of this new fix? |
I have created a workaround for this. Sticking this into your
You need to change this line This basically utilizes a combination of Vim auto-commands and ConEmu GUI macros to force ConEmu to change the cursor shape when Vim enters or leaves insert mode. Forcing Vim to redraw the screen (the Needless to say that this is a hack and forcing Vim to clean and redraw the screen each time you enter and leave insert mode like that causes a delay in your workflow. |
I just ran into this also. It's pretty important for me and will deter me from working in cmder as I am using vim all the time. |
@offero Did you get this to work? |
@ragvri @offero I tried for quite a while, even as recently as a couple weeks ago. I was never able to get Vim cursors to work correctly in ConEmu. I switched to Terminus which I really love. Not near as many options but I honestly haven't needed any beyond what's provided. Cursor worked exactly as it should, no hacks or workarounds. That cursor thing was a total workflow killer |
@ChasonDeshotel Thanks for this. Works perfectly, although it is a little resource heavy. Did you also try alacritty? It seems to be resource light. Update: It does not seem to work for me without adding some lines in my vimrc. I am using wsl and terminus. |
An update. This still doesn't work. Environment: Using vim on bash in WSL. |
@ragvri way late here but yes, I did try Alacritty and was unable to get it to work |
I'm using ConEmu for both vim.exe and vim on bash. In vim.exe, going from Normal mode to Insert mode makes the cursor switch from fat to thin, and vice versa, but the same doesn't apply for vim on bash. I am aware that the text cursor width can be adjusted in the settings, but I haven't seen any config that influences automatic text width-toggling within vim/bash.
The text was updated successfully, but these errors were encountered: