ConEmu icon indicating copy to clipboard operation
ConEmu copied to clipboard

`vim` in `cmd::Cmder` display black screen

Open playgithub opened this issue 2 years ago • 60 comments

Versions

OS: Windows 11 21H2 22000.194 ConEmu Version: 210912

Problem description

vim in cmd::Cmder display black screen but it works blindly, e.g.

  • cursor moves when typing
  • :q leads to quit

playgithub avatar Oct 12 '21 02:10 playgithub

Press Ctrl-Win-Alt-Space to reveal real console. Try to scroll it. Anything?

Maximus5 avatar Nov 01 '21 23:11 Maximus5

I can't test it now, because I've switched to Linux.

playgithub avatar Nov 02 '21 07:11 playgithub

I have a very similar issue. Also running Windows 11 (new machine, so unlikely to be cluttered by previous installs). ConEmu 210912.

Starting VIM in cmd.exe works perfectly: image

When in ConEmu: image

The real console shows (very small, same output with only 'zz'): image

I can enter in Insert mode and type characters, then write file and exit, so input is correctly handled.

Funny thing: if I resize the real console, it then displays the usual tildes, and conemu output is updated: image image

Would you need any additional info ?

gquerret avatar Nov 02 '21 12:11 gquerret

I have a similar problem on Windows 11 21H2 22000.318 Switching to 'legacy console' in 'CMD' solved the problem. But this introduced a new problem, that is, downloading files via ConEmu would force closed.

Zd036 avatar Nov 25 '21 07:11 Zd036

I have the same issue, fresh install of Win 11, vim in conemu displays only ZZ Win 11 21h2 22000.376 Conemu 210912 VIM: VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Sep 21 2021 16:13:20) Included patches: 1-3441 Compiled by https://www.msys2.org/

ktyl avatar Dec 30 '21 21:12 ktyl

My guess, you do not use the Connector. If so - display problems are not in ConEmu, but in msys/cygwin.

Sometimes the TERM variable change may fix that. E.g. set msys or xterm instead of cygwin, or so...

Maximus5 avatar Jan 01 '22 16:01 Maximus5

I'm using Cmder, but I switched to "plain" ConEmu to reproduce the problem. I downloaded again ConEmu, and found that vim works when used from Bash -- Git Bash, but doesn't work from Shells -- Cmd. Different values of TERM didn't change the outcome.

gquerret avatar Jan 02 '22 07:01 gquerret

I'm using cmder (version 1.3.18.1106, downloaded and installed last week). Seeing @gquerret's post I checked vim in git bash but I have the same effect as in cmd - blan screen with ZZ displayed. I haven't had time yet to play with connector as suggested by @Maximus5, but I tried different values of TERM variable and in my case it also did not change anything.

ktyl avatar Jan 02 '22 16:01 ktyl

Today I noticed something that might be connected: When I type in the text that is longer than a single line, it should start another line. Currently the cursor moves for me to the beginning of the line and overwrites it.

https://user-images.githubusercontent.com/2254879/148541255-5aef59ce-78c3-4cf2-8a27-9e66021d9fe8.mp4

ktyl avatar Jan 07 '22 12:01 ktyl

Same here.

gquerret avatar Jan 07 '22 15:01 gquerret

Funny thing: if I resize the real console, it then displays the usual tildes, and conemu output is updated:

I've just spotted that not only resizing the real console helps, but also resizing conemu window restores the proper content

ktyl avatar Jan 13 '22 08:01 ktyl

I am having the same issue. The most frequent time I encounter this is when using git commit or when I try to paste some long lines into the terminal. Also, if that helps, I noticed that it occurs more frequently to me when I use split tabs.

TayfunTurgut avatar Jan 13 '22 17:01 TayfunTurgut

this one seems to be related: https://github.com/Maximus5/ConEmu/issues/2404

ktyl avatar Feb 04 '22 11:02 ktyl

I am having the same issue as well

image

But re-sizing the Window seems to fix it?

image

On Windows 11 as well:

λ ver

Microsoft Windows [Version 10.0.22000.493]

chocobearz avatar Feb 17 '22 00:02 chocobearz

Same here and resizing the window can fix it. How can I fix this problem? I don't want to resize the window every time.

zhpoo avatar Feb 17 '22 12:02 zhpoo

Same here and resizing the window can fix it. How can I fix this problem? I don't want to resize the window every time.

Switching to 'legacy console' in 'CMD' properties

Zd036 avatar Feb 21 '22 09:02 Zd036

Same issue with Cmder on Windows 11... vi leads to "black screen" with just "ZZ" on 2nd line.

Resizing the window fixes the issue... definitely don't want to have to do that every time, of course.

It would be nice not have to switch CMD to "legacy console"... must be a better fix, at some point, but I can confirm that "legacy console" mode for CMD fixes this issue. I accessed it under Cmder System Menu (lower right hand corner of Cmder window) --> Debug --> Properties --> "Use legacy console" checkbox.

ShivaSmith avatar Feb 22 '22 03:02 ShivaSmith

issue still valid in build 220308 preview

ktyl avatar Mar 09 '22 14:03 ktyl

Use winpty (not good)

Found the issue long time ago. My way to use vim is to use it with winpty like

winpty vim <files ...>

Don't know why... This was found while using msys2 mingw64 vim. Switching to legacy console mode solves the problem. Otherwise, need to use winpty which I don't like. Used ConEmu with msys2. Re-install msys2 from scratch and the problem is still there. My ConEmu setting with msys2 is put the following command line in shortcut icon property. And confirmed problem. ConEmu version = 210912

C:\msys64\msys2_shell.cmd -mingw64 -conemu

Even worse situation, it causes unreliable on-screen cut/paste. It pasted incorrect content often. A couple more time might succeed however. One more, when cat a file, some on-screen content goes some extra spaces. With legacy set, no problem. Guess this should be in another issue, but it looked pretty the same related.

tienli avatar Mar 17 '22 18:03 tienli

The problem doesn't appear after upgrading.

playgithub avatar Apr 05 '22 10:04 playgithub

@playgithub could you please share what have you upgraded?

ktyl avatar Apr 05 '22 13:04 ktyl

I'm using cmder, which uses ConEmu. cmder support automatic update. The version is as below

ConEmu 210912 [64]

playgithub avatar Apr 05 '22 13:04 playgithub

For me the fresh installation of cmder is still not working, have the same symptoms as before. The same happens after manually upgrading to conemu 220308 preview. I have no idea why it has started working for you, but in my case nothing has changed...

ktyl avatar Apr 05 '22 14:04 ktyl

Same here, Windows 11 as well. It occurs to me when turn to Vim using git functions:

λ ver

Microsoft Windows [Versión 10.0.22000.593]

Cmder version: Version 1.3.18.1106

ghost avatar Apr 11 '22 09:04 ghost

Is that reproduced with build 220418?

Maximus5 avatar Apr 18 '22 21:04 Maximus5

@Maximus5 unfortunately the issue still exists in 220418 for me

ktyl avatar Apr 18 '22 22:04 ktyl

Hi everyone,

I'm still encountering this problem when using Windows 11 version 21H2 with the latest Cmder stable release (ConEmu 210912).

One workaround is to resize the window, as suggested by the others, and the usual format of Vim will be displayed. Thanks for the suggestions but hopefully this issue will be fixed.

edoswaldgo avatar Apr 19 '22 23:04 edoswaldgo

I met this issue today(May 12th, 2022) on win11 22000.675. However, the problem magically disappears after I installed gvim for Windows from its official website and upgrade the Windows system (with KB5013628 and KB5013943). I did those things with no intention to fix the cmder vim issue but vim in cmder seems work fine later.

Since the update notes of KB5013628 and KB5013943 mention nothing remotely relevant to this issue, I assume you guys could try installing gvim to fix this issue.

cRyckreator avatar May 12 '22 11:05 cRyckreator

I met this issue today(May 12th, 2022) on win11 22000.675. However, the problem magically disappears after I installed gvim for Windows from its official website and upgrade the Windows system (with KB5013628 and KB5013943). I did those things with no intention to fix the cmder vim issue but vim in cmder seems work fine later.

Since the update notes of KB5013628 and KB5013943 mention nothing remotely relevant to this issue, I assume you guys could try installing gvim to fix this issue.

@cRyckreator can you tell me, what is the version of the gvim you download? I install [gvim_8.2.2825.exe], but still have this issue.

taichushouwang avatar May 17 '22 03:05 taichushouwang

@taichushouwang gVim 8.2 with OLE support

image

It's from the self-installing executable on vim's official site. https://www.vim.org/download.php#pc

Download link: https://ftp.nluug.nl/pub/vim/pc/gvim82.exe

I have no idea how I fix the issue so if this installation works for you pls post a confirmation here to help others

cRyckreator avatar May 18 '22 12:05 cRyckreator