5

Is there a way to change which terminal emulator neovim uses for its :terminal command? I am running neovim on Windows 10, and it used cmd by default; however, I would rather use cmder or another linux-style emulator if I can.

1 Answer 1

4

Neovim uses its own internal terminal emulator for :term. You can not change that (as far as I know). The thing you can change is the command interpreter/shell that runs in that terminal. See Wikipedia for the difference: Terminal vs Shell.

You can start any command (that you have installed) in the terminal if you just specify it as the argument: :terminal bash

I don't know how to do that by default but you can read the docs in order to find out if that's possible: :help :terminal.

Or you can define a custom command:

:command MyTerm terminal bash

If you instead want to start cmder in its own window from within Neovim just run :!cmder & (I suppose the & also works in windows?).

4
  • how does it determine which shell is launched? For me it's rather unsuccessfully trying to open C:Program FilesGitusr^Hin^Hash.exe
    – CervEd
    Dec 12, 2021 at 18:14
  • @CervEd Please read the help link I provided and also the help about 'shell'.
    – Lucas
    Dec 13, 2021 at 21:56
  • not exactly the most helpful comment in the world
    – CervEd
    Dec 14, 2021 at 9:26
  • for actual useful information on the various oddities that occurs with shell and term on windows, checkout this issue github.com/neovim/neovim/issues/16646
    – CervEd
    Dec 20, 2022 at 9:27

Your Answer

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

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