1

I have the GVim 8.1 compiled with +terminal flag. After I enter Vim via vim -u NONE, I try to execute simple command, like :terminal cd or :terminal dir just to check the output. Instead of the command being executed, I get the CreateProces failed error. How can I debug this? Does anybody know what might be the cause of it?

I know I can use :!<command> syntax, but I'm testing the terminal syntax so that I can configure it in the future.

Thank you in advance.

  • 1
    you can :terminal cmd.exe /c dir – Maxim Kim Apr 30 at 8:46
  • That's actually quite cool! I hope I can map :terminal cmd to what you just wrote :) Thanks! – ashrasmun May 1 at 9:03
2

dir and cd are not external utilities, but shell builtins. They cannot be executed directly. You have to open :terminal without parameters to run cmd.exe and only after that enter a command like dir.

Note that :! differs, as it prepends :h 'shell' and :h 'shellcmdflag' before your command automatically.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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