Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim in command prompt on Windows 10

Tags:

vim

I wanted to use Vim on the command prompt, but it gave

vim is not recognized as an internal or external command

I tried searching for a solution and found that I should edit the user specific environment variable 'path', but it still gives the same error. What can be the solution?

like image 848
SQR Avatar asked Mar 29 '17 12:03

SQR


People also ask

Can you use vim on Windows CMD?

After its installation, you can use it by opening the command prompt (cmd) then typing “vim”. This will open the vim application. There are two modes available in this editor, one is the insert mode where you can insert anything you like then there is a command mode which is used to perform different functions.

What is the vim command in Windows?

Vim is a powerful code editor. So powerful that both Linux and Mac have it installed by default. But if you are using Windows as your operating system, you will need to install Vim separately. Fortunately, Microsoft makes it very easy to install Vim and get it running on your PC.

What does vim do in CMD?

On Unix-like operating systems, vim, which stands for "Vi Improved", is a text editor. It can be used for editing any kind of text and is especially suited for editing computer programs.


7 Answers

Install vim again and make sure to check the box of "create .bat files" option when installing

like image 145
Kiwi Avatar answered Oct 13 '22 13:10

Kiwi


Go to the file location, and double click install.exe. That will open cmd.

If it asks you "Do you want to uninstall", type N and then type D.

like image 44
m0haMed Avatar answered Oct 13 '22 15:10

m0haMed


Actually I selected 'browse directory' and selected the location of Vim i.e., C:\Program Files (x86)\Vim

You need to locate the directory that contains vim.exe. If you use the default installation options (and latest available version), that would be C:\Program Files (x86)\Vim\vim80.

Note that there's also a 64-bit version of Vim for Windows.

like image 43
Ingo Karkat Avatar answered Oct 13 '22 14:10

Ingo Karkat


It's a problem of the installer on Windows 10!

The installer tries to write some files into C:\WINDOWS, but if you install without administrator privileges, those files cannot be written. However, the rest of the install works and so you think everything is fine.

Try to restart install.exe as an administrator!

like image 36
D. Lohrsträter Avatar answered Oct 13 '22 15:10

D. Lohrsträter


unistall everythingn then follow the guide on: https://www.thewindowsclub.com/install-vim-text-editor-on-windows and make sure to get the full installation it will work in the CMD after that make sure to run it as admin i had the same issue

like image 41
Kylie Staraway Avatar answered Oct 13 '22 13:10

Kylie Staraway


When installing, put it to vim itself to create the bat path file on windows. This was my solution to this problem

like image 40
jonatasvnascimento Avatar answered Oct 13 '22 15:10

jonatasvnascimento


First, open Power shell and set alias for canonized commands (Windows 7 and above):

$ Set-alias vi "\path\to\gvim.exe"

$ Set-alias vim "\path\to\gvim.exe"

like image 20
Scorpion_Veer Avatar answered Oct 13 '22 14:10

Scorpion_Veer