Maximus5 / ConEmu

Customizable Windows terminal with tabs, splits, quake-style, hotkeys and more
https://conemu.github.io/
BSD 3-Clause "New" or "Revised" License
8.62k stars 575 forks source link

Neovim not working properly in cmder(ConEmu) #2353

Open 17Swagat opened 3 years ago

17Swagat commented 3 years ago

Versions

ConEmu build: x64 OS version: Windows 10 Pro Version: 10.0.19043 Build 19043 Used shell version (Far Manager, git-bash, cmd, powershell, cygwin, whatever): cmder 1.3.18.1106

Problem description

I'm using Neovim as my text-editor and it is not working properly in cmder. All the visual aspects (from plugins and basic neovim configuration) are not appearing. For example: The colorscheme, syntax highlighting. Also sometimes texts seems to broken like in the given images. Even though features of plugins that do not involve visuals seems to be working fine, like coc-explorer, coc- code completion, floaterm are working fine (not visually).

I asked about this issue in the cmder github repo (https://github.com/cmderdev/cmder/issues/2583) and chrisant1996(the person who answered) said the following : " Probably it's a matter of setting the terminal info environment variables correctly. The issue is between ConEmu and neovim, so search on the internet for "ConEmu neovim" to find information about using them together.ConEmu is the terminal program used by Cmder. "

On the other everything is working fine when I run neovim from cmd.



Neovim in cmder (Things that are not working fine or behaving abnormally):

1 2 3

### Neovim in cmder (Things that are working fine):

x1 x2 x3

### Neovim in cmd:

y1 y2 y3

### Although vim that comes with Cmder is working normally. (Following Exactly what I've written in its .vimrc file)

y4

Expected results

Neovim should run properly in Cmder(ConEmu) just like it does in Command-prompt.

cpkio commented 3 years ago

Neovim runs fine in ConEmu, I use it daily. It's all about the settings.

Austinito commented 3 years ago

I'm having a very similar issue. It will come up fine, but the second I try to start moving around -- My column numbers and texts gets all misaligned.

Austinito commented 3 years ago

I followed the discussion here and was able to solve my issue. https://github.com/neovim/neovim/issues/8444

My TERM variable was set to cygwin -- which didn't properly work (didn't investigate why). My issues stopped when I set TERM to xterm-256color.

Hope this finds you well! @17Swagat

RaidOpe commented 7 months ago

image

I followed the discussion here and was able to solve my issue. neovim/neovim#8444

My TERM variable was set to cygwin -- which didn't properly work (didn't investigate why). My issues stopped when I set TERM to xterm-256color.

Hope this finds you well! @17Swagat

How to set set TERM=xterm-256color . I have no idea to do so. I try to do it in nvim with :. Any thoughts?

Austinito commented 7 months ago

How to set set TERM=xterm-256color . I have no idea to do so. I try to do it in nvim with :. Any thoughts?

@RaidOpe The TERM is an environment variable that needs to be set in your terminal before you open NeoVim. You can set environment variables using export cmd:

export TERM=xterm

Setting TERM incorrectly can lead to display issues or unexpected behavior in terminal-based applications. It's typically set automatically by your terminal emulator, but you may need to adjust it manually in some cases.

Hope this is helpful!

krodreyer commented 7 months ago

Just type set TERM=xterm-256color in your terminal and hit enter or put it in your startup config of ConEmu like so:

image

To see the value of an environment variable it might depend on which shell you are currently using. For powershell it is "$env:VARIABLENAME" e.g. $env:TERM that should give you "xterm-256color" or whatever it is set to.

deron-dev commented 4 months ago

Vim nor Neovim work for me in ConEmu

The image below shows the same file open in Vim (bottom-left) and Neovim (right)

image

TERM environment variable is xterm-256color

Also, after closing Neovim, the console no longer shows further stdout past the command that started Neovim. You can still run commands, but they nor their output is shown.

Thearthman commented 3 months ago

I've got a similar if not the same issues on Windows 11. Opening up nvim displays nothing and for vim it only displays "zz" just like deronparker's cases. Even tried to run both of them in bash but still not working. TERM is set to xterm-256color according to above and it still doesn't work. However, nano is able to correctly display itself. Screenshot 2024-07-22 221833 image The above error levels are generated and all files contain only the number 0 inside of them.