On Linux, when I exit Neovim, the content in the Neovim window is cleared. But on Windows 10, when I exit Neovim, the content is still shown and is not cleared, leaving a lot of empty space (see image below). By the way, I am using Neovim inside cmder.

I have searched with Goolgle, but can not find useful info. A related question is post here, but it is for Linux.

So how to clear the content of Neovim when I exit on Windows 10?

enter image description here

  • 1
    I don't have enough experience with Windows to answer, but it might be useful to detail how you are using nvim on Windows 10: via the powershell console, via the WSL, via cygwin or a similar tool, or via something else. I think that would help other people to answer your question.
    – statox
    Commented Nov 15, 2018 at 9:18
  • This depends on your terminal. What terminal are you using? In Vim you can configure it using the terminal options t_..., not sure if this works on Windows cmd. Unfortunately, neovim removed all those special terminal options t_<...>, so cannot say it for neovim. Commented Nov 15, 2018 at 9:50
  • @ChristianBrabandt I am using neovim inside cmder. I have updated this info.
    – jdhao
    Commented Nov 15, 2018 at 9:51

2 Answers 2


After more search about related issues. I have finally found a solution which works for Cmder. Open Cmder settings and go to Startup -> Environment, add the following settings:

set TERM=xterm-256color

enter image description here

Restart Cmder and the issue should disappear.

  • 1
    Future readers be warned: this type of explicit setting of TERM only works if the terminal emulator is, in fact, emulating xterm-256color
    – D. Ben Knoble
    Commented Nov 15, 2018 at 16:53

It worked for me in PowerShell Core by adding



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.