This tutorial explains how to install Vim Editor on Windows, Linux, and macOS
How to Install and setup VIM editor on Windows
Following are the steps required to install on Windows.
- Go to vim.org
- Click on the Download link on the left side for navigation
- Download the stable version or old version for the link
PC: MS-DOS and MS-Windows
- It downloads the
gvim82.exe
file to the local system - Double-click on this file and follow the installation instructions
- Select language
- privacy policy
- Choose components Click on Next to finish the installation
How to run and open vim editor from PowerShell
there are several ways to open vi editors in Windows.
- Powershell
- Open Windows run by Windows +R command
- type PowerShell
- It opens the PowerShell window
- Windows Terminal
- Open the command prompt and type vim editor
- or you can open the file with
vim filename
.
Fixing Vim is not recognized as an internal or external command
Once you install vim on Windows, It will not run Vim from the command line by default and gives the following error.
vim is not recognized as an internal or external command, operable program, or batch file:
The reason Vim is not a recognized command to execute and it is not found in the environment path
So, you have to set environment variables to vim location.
- Go to Control Panel > System - It opens the System properties window
- Edit System environment variables
- VIM is installed on
c:\Program Files (x86)\vim
in my windows - Edit PATH environment variable, check vim path is added, if not add this to a PATH environment variable and save it.
Now, the Vim command works in terminal and PowerShell windows.