1

I have added VIM's folder to the PATH environment variable. So, I can access the editor in any terminal I have simply by typing vim. Everything's okay. But there's one peculiarity which puzzles me. It doesn't work. I get

'vim' is not recognized as an internal or external command, operable program or batch file.

in case it was opened/started via the explorer address bar (which is the way I normally do it).

I also have another VIM installed as a Cygwin package and it doesn't have such "limitation" (I can access it using the same Command Prompt that was opened via the explorer address bar).

What I think can be important here is that the Cygwin and its vim package have been installed with installer. But the other VIM is a nightly build which I downloaded as a zip from vim.org (so, it's kind of "portable").


Now, I wonder is there anything else I should have done to the system/vim itself apart from adding the folder to the PATH, so my "portable" VIM work properly inside the Windows (like the Cygwin one mentioned above)?

Anything else that may be the cause of this issue?

double-beep
  • 5,031
  • 17
  • 33
  • 41
Ahu Lee
  • 349
  • 5
  • 15
  • 4
    Have you closed all Windows Explorer instances after adding VIM folder path to __system__ `PATH`? Or have you even better restarted Windows after adding VIM folder path to __system__ `PATH`? Why? Please read [What is the reason for '...' is not recognized as an internal or external command, operable program or batch file?](https://stackoverflow.com/a/41461002/3074564) and I hope you understand why restart of Windows is usually the easiest method for a user to get a __system__ `PATH` modification distributed to all processes. – Mofi Dec 13 '18 at 16:03

1 Answers1

4

Every time you change your environment variables, move important system files, perform a disk cleanup, etc. it's highly recommended that you always perform a restart, so that the changes are correctly and fully applied.

See also: What is the reason for "X is not recognized as an internal or external command, operable program or batch file"?.

double-beep
  • 5,031
  • 17
  • 33
  • 41