Created
July 4, 2026 08:00
-
-
Save ptantiku/c7d27f97acd7e9c12deb3fd7c3ab3436 to your computer and use it in GitHub Desktop.
Install VIM in Windows using winget command, and set the user environment's path variable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Install Vim via winget (non-interactive) | |
| winget install --id vim.vim -e --accept-source-agreements --accept-package-agreements | |
| # Add Vim to USER PATH if not already present | |
| $vimPath = "$env:LOCALAPPDATA\Programs\Vim" | |
| $userPath = [Environment]::GetEnvironmentVariable("PATH", "User") | |
| if ($userPath -notlike "*$vimPath*") { | |
| [Environment]::SetEnvironmentVariable("PATH", "$userPath;$vimPath", "User") | |
| Write-Host "Added $vimPath to user PATH. Open a new shell to use it." | |
| } else { | |
| Write-Host "$vimPath already in user PATH." | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment