Skip to content

Instantly share code, notes, and snippets.

@onlinemax
Last active April 23, 2025 17:27
Show Gist options
  • Save onlinemax/1037b152c726d12ba8aa5725d0045394 to your computer and use it in GitHub Desktop.
Save onlinemax/1037b152c726d12ba8aa5725d0045394 to your computer and use it in GitHub Desktop.
Add-Type -AssemblyName System.IO.Compression.FileSystem
# Install nvim to a windows computer with my config with everything ready
$nvim_url = 'https://github.com/neovim/neovim/releases/download/v0.11.0/nvim-win64.zip'
$nvim_out = (Get-Location).PATH + '\nvim.zip'
$git_url = 'https://github.com/git-for-windows/git/releases/download/v2.49.0.windows.1/Git-2.49.0-64-bit.exe'
$git_out = (Get-Location).PATH + '\GitInstaller.exe'
# Install everything
$wc = New-Object net.webclient
echo "Installing git"
$wc.Downloadfile($git_url, $git_out)
# echo "Installing nvim"
$wc.Downloadfile($nvim_url, $nvim_out)
[System.IO.Compression.ZipFile]::ExtractToDirectory($nvim_out, (Get-Location).PATH + '\nvim')
mv nvim\nvim-win64 .
rm nvim
mv nvim-win64 nvim
# Take Care of git
Start-Process -FilePath .\GitInstaller.exe -Wait -ArgumentList '/VERYSILENT', '/NORESTART'
# Add nvim to path
$env:Path += ";" + (Get-Location).PATH + '\nvim\bin'
# # Reload Path
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
# Get the config
git clone https://github.com/onlinemax/kickstart.nvim.git C:\Users\2431325\AppData\Local\nvim
# Clean everythign
rm nvim.zip
rm $git_out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment