I'd like to change the default terminal of Vim from cmd to cmder. By using :help :terminal I have read the terminal.txt but it seems that there is no setting instruction in that help file.

So is it likely to change the default terminal of vim by using :terminal?

1 Answer 1


The help for :terminal says:

If [command] is not given the 'shell' option is used.

On that help page, if you move the cursor inside the word "shell" and press C-] (the control key and the right bracket), it'll take you to the help for the shell setting. Alternatively, you can get there with :help 'shell'.

It looks like you should be able to add the following to your vimrc:

set shell=cmder

You may need to specify the full path to cmder depending on whether it's in your system path.

Also note that the shell setting is used for executing external commands from vim. I'd recommend reading the help for that setting to make sure it will work as you expect.

  • Thanks, it works after I set the path to cmder.exe. However the Cmder window pops up instead of staying inside the gvim window as expected when I use :terminal .
    – TizeeU0U
    Apr 11, 2019 at 3:33
  • Have a look at this link: github.com/cmderdev/cmder/wiki/…. You may be able to adapt this to make it integrate with vim better. Unfortunately, I'm not particularly familiar with cmder, but it appears to be more of a terminal emulator rather than a shell, so that may have something to do with it. This link explains the difference better than I can: askubuntu.com/questions/506510/…
    – Pak
    Apr 11, 2019 at 12:24
  • Thanks.:help terminal tells me that the vim terminal is actually also a emulator so it's silly to run a terminal emulator in another terminal emulator. So I just change the default shell to the WSL bash following the setup from vi.stackexchange.com/questions/16386/….
    – TizeeU0U
    Apr 12, 2019 at 3:52
  • What's the answer for Neovim? Feb 18, 2023 at 12:56

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.