Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vim : The term 'vim' is not recognized as the name of a cmdlet?

Tags:

vim

laravel

I'm following a tutorial on Laravel. I've never used it before. The tutorial say I should use create a file with vim database/database.sql but when I do I get the error:

vim : The term 'vim' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ vim
+ ~~~
    + CategoryInfo          : ObjectNotFound: (vim:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

I've tried to install vim from vim.org but don't know if this is right. Any help is greatly appreciated. I'm using windows 10.

like image 719
andreasv Avatar asked May 10 '20 11:05

andreasv


1 Answers

In addition to installing Vim from vim.org, you also need to make sure it's added to $PATH in order to use it from the command line without using the full path. On Windows, you can do this with

Control Panel -> System -> Edit the system environment variables -> Click Environment Variables -> Find the PATH variable -> Click "edit" -> Check if Vim is here, otherwise click "new" -> Click "browse" -> Navigate to the Vim executable that you installed

After vim has been added to PATH, you should be able to use it from the command line. You will need to close and re-open Cmd/PowerShell.

like image 60
Christian Fosli Avatar answered Sep 21 '22 19:09

Christian Fosli